From 7a9254962bf3b636a3c04da69e94bc00da7d5935 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 8 Apr 2016 12:41:36 -0700 Subject: [PATCH] staging: comedi: das1800: remove 'common' boardinfo member The "hc" type boards do not support common mode analog inputs all the other board types do. Remove the unnecessary member from the boardinfo and use the 'id' member to determine if the SDF_COMMON flag should be set for the subdevice. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index e24d0c9..6795f3e 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -229,7 +229,6 @@ struct das1800_board { int ai_speed; /* max conversion period in nanoseconds */ int resolution; /* bits of ai resolution */ int qram_len; /* length of card's channel / gain queue */ - int common; /* supports AREF_COMMON flag */ int do_n_chan; /* number of digital output channels */ int ao_ability; /* 0 == no analog out, 1 == basic analog out, 2 == waveform analog out */ int ao_n_chan; /* number of analog out channels */ @@ -247,7 +246,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 6250, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 0, .ao_n_chan = 0, @@ -259,7 +257,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 6250, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 1, .ao_n_chan = 4, @@ -271,7 +268,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 6250, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 0, .ao_n_chan = 0, @@ -283,7 +279,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 6250, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 1, .ao_n_chan = 4, @@ -295,7 +290,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 20000, .resolution = 16, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 0, .ao_n_chan = 0, @@ -307,7 +301,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 20000, .resolution = 16, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 1, .ao_n_chan = 2, @@ -319,7 +312,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 6250, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 2, .ao_n_chan = 2, @@ -331,7 +323,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 6250, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 2, .ao_n_chan = 2, @@ -343,7 +334,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 0, .ao_n_chan = 0, @@ -355,7 +345,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 1, .ao_n_chan = 4, @@ -367,7 +356,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 0, .ao_n_chan = 0, @@ -379,7 +367,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 1, .ao_n_chan = 4, @@ -391,7 +378,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 10000, .resolution = 16, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 0, .ao_n_chan = 0, @@ -403,7 +389,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 10000, .resolution = 16, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 1, .ao_n_chan = 2, @@ -415,7 +400,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 64, - .common = 0, .do_n_chan = 8, .ao_ability = 1, .ao_n_chan = 2, @@ -427,7 +411,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 64, - .common = 0, .do_n_chan = 8, .ao_ability = 1, .ao_n_chan = 2, @@ -439,7 +422,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 2, .ao_n_chan = 2, @@ -451,7 +433,6 @@ static const struct das1800_board das1800_boards[] = { .ai_speed = 3000, .resolution = 12, .qram_len = 256, - .common = 1, .do_n_chan = 4, .ao_ability = 2, .ao_n_chan = 2, @@ -1394,7 +1375,7 @@ static int das1800_attach(struct comedi_device *dev, s = &dev->subdevices[0]; s->type = COMEDI_SUBD_AI; s->subdev_flags = SDF_READABLE | SDF_DIFF | SDF_GROUND; - if (board->common) + if (board->id != DAS1800_ID_HC) s->subdev_flags |= SDF_COMMON; s->n_chan = board->qram_len; s->maxdata = (1 << board->resolution) - 1; -- 2.7.4