aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/adv_pci1710.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-11-13 11:11:05 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-18 14:56:30 -0800
commit8a8d0875a5ccf14a6772b3bbffa1717e668a0d8a (patch)
tree210eaa752f157f4b35faed3a21b3dff6500c0582 /drivers/staging/comedi/drivers/adv_pci1710.c
parentstaging: comedi: adv_pci1710: remove 'has_irq' boardinfo (diff)
downloadlinux-dev-8a8d0875a5ccf14a6772b3bbffa1717e668a0d8a.tar.xz
linux-dev-8a8d0875a5ccf14a6772b3bbffa1717e668a0d8a.zip
staging: comedi: adv_pci1710: remove 'has_counter' boardinfo
All the boards supported by this driver have a 8254 counter. Channels 1 and 2 are used to create the cascaded 32-bit analog input pacer. Counter 0 is available for the user on all the boards except the PCI-1713. Remove the 'has_counter' boardinfo and use the 'is_pci1713' boardinfo to determine if the user counter subdevice needs to be allocated and initialized. 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/drivers/adv_pci1710.c')
-rw-r--r--drivers/staging/comedi/drivers/adv_pci1710.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index 032d1d41a139..62f9f478421c 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -138,7 +138,6 @@ struct boardtype {
unsigned int has_diff_ai:1;
unsigned int has_ao:1;
unsigned int has_di_do:1;
- unsigned int has_counter:1;
};
static const struct boardtype boardtypes[] = {
@@ -151,7 +150,6 @@ static const struct boardtype boardtypes[] = {
.has_diff_ai = 1,
.has_ao = 1,
.has_di_do = 1,
- .has_counter = 1,
},
[BOARD_PCI1710HG] = {
.name = "pci1710hg",
@@ -162,7 +160,6 @@ static const struct boardtype boardtypes[] = {
.has_diff_ai = 1,
.has_ao = 1,
.has_di_do = 1,
- .has_counter = 1,
},
[BOARD_PCI1711] = {
.name = "pci1711",
@@ -171,7 +168,6 @@ static const struct boardtype boardtypes[] = {
.rangecode_ai = range_codes_pci17x1,
.has_ao = 1,
.has_di_do = 1,
- .has_counter = 1,
},
[BOARD_PCI1713] = {
.name = "pci1713",
@@ -791,7 +787,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
n_subdevices++;
if (board->has_di_do)
n_subdevices += 2;
- if (board->has_counter)
+ if (!board->is_pci1713) /* all other boards have a user counter */
n_subdevices++;
ret = comedi_alloc_subdevices(dev, n_subdevices);
@@ -866,8 +862,8 @@ static int pci1710_auto_attach(struct comedi_device *dev,
subdev++;
}
- /* Counter subdevice (8254) */
- if (board->has_counter) {
+ if (!board->is_pci1713) {
+ /* Counter subdevice (8254) */
s = &dev->subdevices[subdev];
comedi_8254_subdevice_init(s, dev->pacer);