Skip to content

Commit

Permalink
staging: comedi: addi_apci_16xx: add defines for the PCI device ids
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 22, 2013
1 parent 5e72c17 commit b194218
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions drivers/staging/comedi/drivers/addi_apci_16xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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
*/
Expand All @@ -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 */
},
};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b194218

Please sign in to comment.