From cb3e9d86945181a2d9154543f402dccf35d8dd58 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 24 Oct 2012 16:29:32 -0700 Subject: [PATCH] staging: comedi: comedidev.h: add PCI_VENDOR_ID_CB Add a define for the ComputerBoards/Measurement Computing PCI vendor id. Remove the duplicates in the drivers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedidev.h | 6 +++- drivers/staging/comedi/drivers/8255_pci.c | 3 -- drivers/staging/comedi/drivers/cb_pcidas.c | 3 -- drivers/staging/comedi/drivers/cb_pcidas64.c | 42 +++++++++++++--------------- drivers/staging/comedi/drivers/cb_pcidda.c | 1 - drivers/staging/comedi/drivers/cb_pcimdas.c | 4 +-- drivers/staging/comedi/drivers/cb_pcimdda.c | 3 +- drivers/staging/comedi/drivers/das08.c | 3 +- 8 files changed, 28 insertions(+), 37 deletions(-) diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 78a44fc..78bc062 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -54,9 +54,13 @@ COMEDI_MINORVERSION, COMEDI_MICROVERSION) #define COMEDI_RELEASE VERSION -#define PCI_VENDOR_ID_ADLINK 0x144a +/* + * PCI Vendor IDs not in + */ #define PCI_VENDOR_ID_ICP 0x104c #define PCI_VENDOR_ID_CONTEC 0x1221 +#define PCI_VENDOR_ID_CB 0x1307 /* Measurement Computing */ +#define PCI_VENDOR_ID_ADLINK 0x144a #define COMEDI_NUM_MINORS 0x100 #define COMEDI_NUM_BOARD_MINORS 0x30 diff --git a/drivers/staging/comedi/drivers/8255_pci.c b/drivers/staging/comedi/drivers/8255_pci.c index 6191a82..d9b46a1 100644 --- a/drivers/staging/comedi/drivers/8255_pci.c +++ b/drivers/staging/comedi/drivers/8255_pci.c @@ -65,9 +65,6 @@ Configuration Options: not applicable, uses PCI auto config #define PCI_DEVICE_ID_ADLINK_PCI7248 0x7248 #define PCI_DEVICE_ID_ADLINK_PCI7296 0x7296 -/* ComputerBoards is now known as Measurement Computing */ -#define PCI_VENDOR_ID_CB 0x1307 - #define PCI_DEVICE_ID_CB_PCIDIO48H 0x000b #define PCI_DEVICE_ID_CB_PCIDIO24H 0x0014 #define PCI_DEVICE_ID_CB_PCIDIO96H 0x0017 diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c index 0e4d189..8e88573 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas.c +++ b/drivers/staging/comedi/drivers/cb_pcidas.c @@ -76,9 +76,6 @@ analog triggering on 1602 series #include "amcc_s5933.h" #include "comedi_fc.h" -/* PCI vendor number of ComputerBoards/MeasurementComputing */ -#define PCI_VENDOR_ID_CB 0x1307 - #define TIMER_BASE 100 /* 10MHz master clock */ #define AI_BUFFER_SIZE 1024 /* max ai fifo size */ #define AO_BUFFER_SIZE 1024 /* max ao fifo size */ diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index a6f5e5e..0ae7ef5 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -105,8 +105,6 @@ TODO: #define PRESCALED_TIMER_BASE 10000 /* 100kHz 'prescaled' clock for slow acquisition, maybe I'll support this someday */ #define DMA_BUFFER_SIZE 0x1000 -#define PCI_VENDOR_ID_COMPUTERBOARDS 0x1307 - /* maximum value that can be loaded into board's 24-bit counters*/ static const int max_counter_value = 0xffffff; @@ -1661,7 +1659,7 @@ static struct pci_dev *cb_pcidas64_find_pci_dev(struct comedi_device *dev, slot != PCI_SLOT(pcidev->devfn)) continue; } - if (pcidev->vendor != PCI_VENDOR_ID_COMPUTERBOARDS) + if (pcidev->vendor != PCI_VENDOR_ID_CB) continue; for (i = 0; i < ARRAY_SIZE(pcidas64_boards); i++) { @@ -4258,25 +4256,25 @@ static void __devexit cb_pcidas64_pci_remove(struct pci_dev *dev) } static DEFINE_PCI_DEVICE_TABLE(cb_pcidas64_pci_table) = { - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x001d) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x001e) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0035) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0036) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0037) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0052) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x005d) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x005e) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x005f) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0061) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0062) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0063) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0064) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0066) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0067) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0068) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x006f) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0078) }, - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0079) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x001d) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x001e) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0035) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0036) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0037) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0052) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x005d) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x005e) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x005f) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0061) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0062) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0063) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0064) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0066) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0067) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0068) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x006f) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0078) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0079) }, { 0 } }; MODULE_DEVICE_TABLE(pci, cb_pcidas64_pci_table); diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c index cc34afc..6692be4 100644 --- a/drivers/staging/comedi/drivers/cb_pcidda.c +++ b/drivers/staging/comedi/drivers/cb_pcidda.c @@ -54,7 +54,6 @@ Please report success/failure with other different cards to /* * 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 diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index 138cfb1..b093c9d 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -51,8 +51,6 @@ See http://www.mccdaq.com/PDFs/Manuals/pcim-das1602-16.pdf for more details. /* #define CBPCIMDAS_DEBUG */ #undef CBPCIMDAS_DEBUG -#define PCI_VENDOR_ID_COMPUTERBOARDS 0x1307 - /* Registers for the PCIM-DAS1602/16 */ /* sizes of io regions (bytes) */ @@ -306,7 +304,7 @@ static void __devexit cb_pcimdas_pci_remove(struct pci_dev *dev) } static DEFINE_PCI_DEVICE_TABLE(cb_pcimdas_pci_table) = { - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, 0x0056) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, 0x0056) }, { 0 } }; MODULE_DEVICE_TABLE(pci, cb_pcimdas_pci_table); diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c index 9c01500..94aa2af 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdda.c +++ b/drivers/staging/comedi/drivers/cb_pcimdda.c @@ -84,7 +84,6 @@ Configuration Options: not applicable, uses PCI auto config #include "8255.h" /* device ids of the cards we support -- currently only 1 card supported */ -#define PCI_VENDOR_ID_COMPUTERBOARDS 0x1307 #define PCI_ID_PCIM_DDA06_16 0x0053 /* @@ -228,7 +227,7 @@ static void __devexit cb_pcimdda_pci_remove(struct pci_dev *dev) } static DEFINE_PCI_DEVICE_TABLE(cb_pcimdda_pci_table) = { - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, PCI_ID_PCIM_DDA06_16) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_ID_PCIM_DDA06_16) }, { 0 } }; MODULE_DEVICE_TABLE(pci, cb_pcimdda_pci_table); diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index fe5cf77..03a82d2 100644 --- a/drivers/staging/comedi/drivers/das08.c +++ b/drivers/staging/comedi/drivers/das08.c @@ -65,7 +65,6 @@ #define DO_PCI IS_ENABLED(CONFIG_COMEDI_DAS08_PCI) #define DO_COMEDI_DRIVER_REGISTER (DO_ISA || DO_PCI) -#define PCI_VENDOR_ID_COMPUTERBOARDS 0x1307 #define PCI_DEVICE_ID_PCIDAS08 0x29 #define PCIDAS08_SIZE 0x54 @@ -876,7 +875,7 @@ static struct comedi_driver das08_driver = { #if DO_PCI static DEFINE_PCI_DEVICE_TABLE(das08_pci_table) = { - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTERBOARDS, PCI_DEVICE_ID_PCIDAS08) }, + { PCI_DEVICE(PCI_VENDOR_ID_CB, PCI_DEVICE_ID_PCIDAS08) }, {0} }; -- 2.7.4