diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-08-16 22:50:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-17 11:17:34 -0400 |
commit | e070c6a949c4b7f0ebe73a08ff4df422b0d95216 (patch) | |
tree | ad474763fdf9542b30c5ebdcf1c7fa8987f2078b | |
parent | ce774eab13606610df53301897e9c003476d7c6c (diff) |
staging: comedi: cb_pcimdda: remove the DIO_METHODS
The digital i/o on this card is handled by an 8255 compatible
device. There are not other options. Remove the DIO_METHODS
enum as well as the dio_method variable in the boardinfo and
the code dealing with it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/cb_pcimdda.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c index b4d1f8b6136f..f658cff19f40 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdda.c +++ b/drivers/staging/comedi/drivers/cb_pcimdda.c | |||
@@ -102,7 +102,6 @@ struct cb_pcimdda_board { | |||
102 | int ao_chans; | 102 | int ao_chans; |
103 | int ao_bits; | 103 | int ao_bits; |
104 | int dio_chans; | 104 | int dio_chans; |
105 | int dio_method; | ||
106 | /* how many bytes into the BADR are the DIO ports */ | 105 | /* how many bytes into the BADR are the DIO ports */ |
107 | int dio_offset; | 106 | int dio_offset; |
108 | int regs_badrindex; /* IO Region for the control, analog output, | 107 | int regs_badrindex; /* IO Region for the control, analog output, |
@@ -110,12 +109,6 @@ struct cb_pcimdda_board { | |||
110 | int reg_sz; /* number of bytes of registers in io region */ | 109 | int reg_sz; /* number of bytes of registers in io region */ |
111 | }; | 110 | }; |
112 | 111 | ||
113 | enum DIO_METHODS { | ||
114 | DIO_NONE = 0, | ||
115 | DIO_8255, | ||
116 | DIO_INTERNAL /* unimplemented */ | ||
117 | }; | ||
118 | |||
119 | static const struct cb_pcimdda_board cb_pcimdda_boards[] = { | 112 | static const struct cb_pcimdda_board cb_pcimdda_boards[] = { |
120 | { | 113 | { |
121 | .name = "cb_pcimdda06-16", | 114 | .name = "cb_pcimdda06-16", |
@@ -123,7 +116,6 @@ static const struct cb_pcimdda_board cb_pcimdda_boards[] = { | |||
123 | .ao_chans = 6, | 116 | .ao_chans = 6, |
124 | .ao_bits = 16, | 117 | .ao_bits = 16, |
125 | .dio_chans = 24, | 118 | .dio_chans = 24, |
126 | .dio_method = DIO_8255, | ||
127 | .dio_offset = 12, | 119 | .dio_offset = 12, |
128 | .regs_badrindex = 3, | 120 | .regs_badrindex = 3, |
129 | .reg_sz = 16, | 121 | .reg_sz = 16, |
@@ -283,20 +275,11 @@ static int cb_pcimdda_attach(struct comedi_device *dev, | |||
283 | s = dev->subdevices + 1; | 275 | s = dev->subdevices + 1; |
284 | /* digital i/o subdevice */ | 276 | /* digital i/o subdevice */ |
285 | if (thisboard->dio_chans) { | 277 | if (thisboard->dio_chans) { |
286 | switch (thisboard->dio_method) { | 278 | ret = subdev_8255_init(dev, s, NULL, |
287 | case DIO_8255: | 279 | dev->iobase + thisboard->dio_offset); |
288 | ret = subdev_8255_init(dev, s, NULL, | 280 | if (ret) |
289 | dev->iobase + thisboard->dio_offset); | 281 | return ret; |
290 | if (ret) | 282 | devpriv->attached_to_8255 = 1; |
291 | return ret; | ||
292 | devpriv->attached_to_8255 = 1; | ||
293 | break; | ||
294 | case DIO_INTERNAL: | ||
295 | default: | ||
296 | printk("DIO_INTERNAL not implemented yet!\n"); | ||
297 | return -ENXIO; | ||
298 | break; | ||
299 | } | ||
300 | } else { | 283 | } else { |
301 | s->type = COMEDI_SUBD_UNUSED; | 284 | s->type = COMEDI_SUBD_UNUSED; |
302 | } | 285 | } |