diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-11-18 12:07:31 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-21 18:57:40 -0500 |
commit | a54b6e60f32841e482d6d5ad5edb136fd68697ad (patch) | |
tree | af23cdaacd65a84ce2a8b5ec316f209132ef14cb | |
parent | 2b60bbde040f1ad542bfc7d94b6b9b4b71140f5f (diff) |
staging: comedi: adv_pci_dio: move and rename the MAX_*_SUBDEV[SG] defines
For aesthetics, move these defines after the register defines and rename
them to have namespace associated with the driver.
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>
-rw-r--r-- | drivers/staging/comedi/drivers/adv_pci_dio.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/staging/comedi/drivers/adv_pci_dio.c index 2f89cbec670c..f3c9628c7d95 100644 --- a/drivers/staging/comedi/drivers/adv_pci_dio.c +++ b/drivers/staging/comedi/drivers/adv_pci_dio.c | |||
@@ -31,11 +31,6 @@ | |||
31 | #include "8255.h" | 31 | #include "8255.h" |
32 | #include "comedi_8254.h" | 32 | #include "comedi_8254.h" |
33 | 33 | ||
34 | #define MAX_DI_SUBDEVS 2 /* max number of DI subdevices per card */ | ||
35 | #define MAX_DO_SUBDEVS 2 /* max number of DO subdevices per card */ | ||
36 | #define MAX_DIO_SUBDEVG 2 /* max number of DIO subdevices group per | ||
37 | * card */ | ||
38 | |||
39 | /* | 34 | /* |
40 | * Register offset definitions | 35 | * Register offset definitions |
41 | */ | 36 | */ |
@@ -61,6 +56,11 @@ | |||
61 | /* PCI-1762 interrupt control registers */ | 56 | /* PCI-1762 interrupt control registers */ |
62 | #define PCI1762_INT_REG 0x06 /* R/W: status/control */ | 57 | #define PCI1762_INT_REG 0x06 /* R/W: status/control */ |
63 | 58 | ||
59 | /* maximum number of subdevice descriptions in the boardinfo */ | ||
60 | #define PCI_DIO_MAX_DI_SUBDEVS 2 /* 2 x 8/16/32 input channels max */ | ||
61 | #define PCI_DIO_MAX_DO_SUBDEVS 2 /* 2 x 8/16/32 output channels max */ | ||
62 | #define PCI_DIO_MAX_DIO_SUBDEVG 2 /* 2 x any number of 8255 devices max */ | ||
63 | |||
64 | enum pci_dio_boardid { | 64 | enum pci_dio_boardid { |
65 | TYPE_PCI1730, | 65 | TYPE_PCI1730, |
66 | TYPE_PCI1733, | 66 | TYPE_PCI1733, |
@@ -86,9 +86,9 @@ struct diosubd_data { | |||
86 | struct dio_boardtype { | 86 | struct dio_boardtype { |
87 | const char *name; /* board name */ | 87 | const char *name; /* board name */ |
88 | int nsubdevs; | 88 | int nsubdevs; |
89 | struct diosubd_data sdi[MAX_DI_SUBDEVS]; /* DI chans */ | 89 | struct diosubd_data sdi[PCI_DIO_MAX_DI_SUBDEVS]; |
90 | struct diosubd_data sdo[MAX_DO_SUBDEVS]; /* DO chans */ | 90 | struct diosubd_data sdo[PCI_DIO_MAX_DO_SUBDEVS]; |
91 | struct diosubd_data sdio[MAX_DIO_SUBDEVG]; /* DIO 8255 chans */ | 91 | struct diosubd_data sdio[PCI_DIO_MAX_DIO_SUBDEVG]; |
92 | unsigned long id_reg; | 92 | unsigned long id_reg; |
93 | unsigned long timer_regbase; | 93 | unsigned long timer_regbase; |
94 | unsigned int is_16bit:1; | 94 | unsigned int is_16bit:1; |
@@ -385,7 +385,7 @@ static int pci_dio_auto_attach(struct comedi_device *dev, | |||
385 | return ret; | 385 | return ret; |
386 | 386 | ||
387 | subdev = 0; | 387 | subdev = 0; |
388 | for (i = 0; i < MAX_DI_SUBDEVS; i++) { | 388 | for (i = 0; i < PCI_DIO_MAX_DI_SUBDEVS; i++) { |
389 | d = &board->sdi[i]; | 389 | d = &board->sdi[i]; |
390 | if (d->chans) { | 390 | if (d->chans) { |
391 | s = &dev->subdevices[subdev++]; | 391 | s = &dev->subdevices[subdev++]; |
@@ -401,7 +401,7 @@ static int pci_dio_auto_attach(struct comedi_device *dev, | |||
401 | } | 401 | } |
402 | } | 402 | } |
403 | 403 | ||
404 | for (i = 0; i < MAX_DO_SUBDEVS; i++) { | 404 | for (i = 0; i < PCI_DIO_MAX_DO_SUBDEVS; i++) { |
405 | d = &board->sdo[i]; | 405 | d = &board->sdo[i]; |
406 | if (d->chans) { | 406 | if (d->chans) { |
407 | s = &dev->subdevices[subdev++]; | 407 | s = &dev->subdevices[subdev++]; |
@@ -432,7 +432,7 @@ static int pci_dio_auto_attach(struct comedi_device *dev, | |||
432 | } | 432 | } |
433 | } | 433 | } |
434 | 434 | ||
435 | for (i = 0; i < MAX_DIO_SUBDEVG; i++) { | 435 | for (i = 0; i < PCI_DIO_MAX_DIO_SUBDEVG; i++) { |
436 | d = &board->sdio[i]; | 436 | d = &board->sdio[i]; |
437 | for (j = 0; j < d->chans; j++) { | 437 | for (j = 0; j < d->chans; j++) { |
438 | s = &dev->subdevices[subdev++]; | 438 | s = &dev->subdevices[subdev++]; |