Commit 7a925496 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fa33428f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment