summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-10-24 16:29:16 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-24 19:35:48 -0700
commitb9287a30122c24246a48342138788223e836d9d3 (patch)
treee155d97a91a5f20b4085ae75ba8de46aca4c31f3 /drivers
parentc1225b6f909fc91ec5352c3e87dce5b2bcbb7226 (diff)
staging: comedi: cb_pcidda: 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/cb_pcidda.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index 5f3242ce8c7d..cc34afcea487 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -51,8 +51,17 @@ Please report success/failure with other different cards to
#include "comedi_fc.h"
#include "8255.h"
-/* PCI vendor number of ComputerBoards */
-#define PCI_VENDOR_ID_CB 0x1307
+/*
+ * ComputerBoards PCI Device ID's supported by this driver
+ */
+#define PCI_VENDOR_ID_CB 0x1307
+#define PCI_DEVICE_ID_DDA02_12 0x0020
+#define PCI_DEVICE_ID_DDA04_12 0x0021
+#define PCI_DEVICE_ID_DDA08_12 0x0022
+#define PCI_DEVICE_ID_DDA02_16 0x0023
+#define PCI_DEVICE_ID_DDA04_16 0x0024
+#define PCI_DEVICE_ID_DDA08_16 0x0025
+
#define EEPROM_SIZE 128 /* number of entries in eeprom */
/* maximum number of ao channels for supported boards */
#define MAX_AO_CHANNELS 8
@@ -148,7 +157,7 @@ static const struct cb_pcidda_board cb_pcidda_boards[] = {
{
.name = "pci-dda02/12",
.status = 1,
- .device_id = 0x20,
+ .device_id = PCI_DEVICE_ID_DDA02_12,
.ao_chans = 2,
.ao_bits = 12,
.ranges = &cb_pcidda_ranges,
@@ -156,7 +165,7 @@ static const struct cb_pcidda_board cb_pcidda_boards[] = {
{
.name = "pci-dda04/12",
.status = 1,
- .device_id = 0x21,
+ .device_id = PCI_DEVICE_ID_DDA04_12,
.ao_chans = 4,
.ao_bits = 12,
.ranges = &cb_pcidda_ranges,
@@ -164,7 +173,7 @@ static const struct cb_pcidda_board cb_pcidda_boards[] = {
{
.name = "pci-dda08/12",
.status = 0,
- .device_id = 0x22,
+ .device_id = PCI_DEVICE_ID_DDA08_12,
.ao_chans = 8,
.ao_bits = 12,
.ranges = &cb_pcidda_ranges,
@@ -172,7 +181,7 @@ static const struct cb_pcidda_board cb_pcidda_boards[] = {
{
.name = "pci-dda02/16",
.status = 2,
- .device_id = 0x23,
+ .device_id = PCI_DEVICE_ID_DDA02_16,
.ao_chans = 2,
.ao_bits = 16,
.ranges = &cb_pcidda_ranges,
@@ -180,7 +189,7 @@ static const struct cb_pcidda_board cb_pcidda_boards[] = {
{
.name = "pci-dda04/16",
.status = 2,
- .device_id = 0x24,
+ .device_id = PCI_DEVICE_ID_DDA04_16,
.ao_chans = 4,
.ao_bits = 16,
.ranges = &cb_pcidda_ranges,
@@ -188,7 +197,7 @@ static const struct cb_pcidda_board cb_pcidda_boards[] = {
{
.name = "pci-dda08/16",
.status = 0,
- .device_id = 0x25,
+ .device_id = PCI_DEVICE_ID_DDA08_16,
.ao_chans = 8,
.ao_bits = 16,
.ranges = &cb_pcidda_ranges,
@@ -585,12 +594,12 @@ static void __devexit cb_pcidda_pci_remove(struct pci_dev *dev)
}
static DEFINE_PCI_DEVICE_TABLE(cb_pcidda_pci_table) = {
- { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0020) },
- { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0021) },
- { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0022) },
- { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0023) },
- { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0024) },
- { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0025) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_DEVICE_ID_DDA02_12) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_DEVICE_ID_DDA04_12) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_DEVICE_ID_DDA08_12) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_DEVICE_ID_DDA02_16) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_DEVICE_ID_DDA04_16) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_DEVICE_ID_DDA08_16) },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, cb_pcidda_pci_table);