summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-21 16:02:20 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-21 16:08:50 -0800
commitb194218dba531b9c36080d29d10fdf9ef96a15bf (patch)
tree3629a1f89924879e064c1687af39e890a47011f3 /drivers
parent5e72c1744fda105e0f1de6e33bd901a4df1bbaed (diff)
downloadlinux-b194218dba531b9c36080d29d10fdf9ef96a15bf.tar.bz2
staging: comedi: addi_apci_16xx: add defines for the PCI device ids
The PCI device ids supported by this driver are used multiple places in the code. To improve maintainability, create #define's for them. 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_16xx.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c
index 34af45388b88..a04d66ce8a35 100644
--- a/drivers/staging/comedi/drivers/addi_apci_16xx.c
+++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c
@@ -32,6 +32,12 @@
#include "../comedidev.h"
/*
+ * PCI device ids supported by this driver
+ */
+#define PCI_DEVICE_ID_APCI1648 0x1009
+#define PCI_DEVICE_ID_APCI1696 0x100a
+
+/*
* Register I/O map
*/
#define APCI16XX_IN_REG(x) (((x) * 4) + 0x08)
@@ -49,12 +55,12 @@ static const struct apci16xx_boardinfo apci16xx_boardtypes[] = {
{
.name = "apci1648",
.vendor = PCI_VENDOR_ID_ADDIDATA,
- .device = 0x1009,
+ .device = PCI_DEVICE_ID_APCI1648,
.n_chan = 48, /* 2 subdevices */
}, {
.name = "apci1696",
.vendor = PCI_VENDOR_ID_ADDIDATA,
- .device = 0x100A,
+ .device = PCI_DEVICE_ID_APCI1696,
.n_chan = 96, /* 3 subdevices */
},
};
@@ -228,8 +234,8 @@ static void apci16xx_pci_remove(struct pci_dev *dev)
}
static DEFINE_PCI_DEVICE_TABLE(apci16xx_pci_table) = {
- { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009) },
- { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100a) },
+ { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, PCI_DEVICE_ID_APCI1648) },
+ { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, PCI_DEVICE_ID_APCI1696) },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, apci16xx_pci_table);