summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-11-20 15:10:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-26 15:36:41 -0800
commit70adf763bae7bde3edf2faf69df3a8c56dbba685 (patch)
tree921dae1d419b6d003d1af55d06e24216287b6a62 /drivers/staging
parent80b00a5842e2523a66c501c2858bd464cc9d0a06 (diff)
staging: comedi: adv_pci1724: define the board id register bits
For aesthetics, remove the enum and define the bits for this register. 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')
-rw-r--r--drivers/staging/comedi/drivers/adv_pci1724.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c b/drivers/staging/comedi/drivers/adv_pci1724.c
index f8198efb1a09..2df765f43f4e 100644
--- a/drivers/staging/comedi/drivers/adv_pci1724.c
+++ b/drivers/staging/comedi/drivers/adv_pci1724.c
@@ -74,10 +74,7 @@ supported PCI devices are configured as comedi devices automatically.
#define PCI1724_EEPROM_CTRL_REG 0x08
#define PCI1724_SYNC_TRIG_REG 0x0c /* any value works */
#define PCI1724_BOARD_ID_REG 0x10
-
-enum board_id_contents {
- BOARD_ID_MASK = 0xf
-};
+#define PCI1724_BOARD_ID_MASK (0xf << 0)
static const struct comedi_lrange ao_ranges_1724 = {
4, {
@@ -199,8 +196,9 @@ static int adv_pci1724_auto_attach(struct comedi_device *dev,
return retval;
dev->iobase = pci_resource_start(pcidev, 2);
- board_id = inl(dev->iobase + PCI1724_BOARD_ID_REG) & BOARD_ID_MASK;
- dev_info(dev->class_dev, "board id: %d\n", board_id);
+ board_id = inl(dev->iobase + PCI1724_BOARD_ID_REG);
+ dev_info(dev->class_dev, "board id: %d\n",
+ board_id & PCI1724_BOARD_ID_MASK);
retval = setup_subdevices(dev);
if (retval < 0)