summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2016-04-08 12:41:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-28 22:16:10 -0700
commit7a9254962bf3b636a3c04da69e94bc00da7d5935 (patch)
treeab9ee096b715a5ce68c9dfeffab82917f2a1cd38 /drivers/staging/comedi
parentfa33428fe00743dd11965f6276a994f3088f551d (diff)
downloadlinux-7a9254962bf3b636a3c04da69e94bc00da7d5935.tar.bz2
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 <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/das1800.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
index e24d0c9ca13a..6795f3e03d1a 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;