Move the MODULE_DEVICE_TABLE for each addi-data driver from addi_common.c to the individual driver files. This removes the need #ifdef'ery. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- .../staging/comedi/drivers/addi-data/addi_common.c | 79 ---------------------- drivers/staging/comedi/drivers/addi_apci_035.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_1032.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_1500.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_1516.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_1564.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_16xx.c | 8 +++ drivers/staging/comedi/drivers/addi_apci_1710.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_2016.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_2032.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_2200.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_3001.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_3120.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_3200.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_3300.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_3501.c | 7 ++ drivers/staging/comedi/drivers/addi_apci_3xxx.c | 30 ++++++++ 17 files changed, 136 insertions(+), 79 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index f4311a4..400acaf 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -58,85 +58,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ #endif -static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { -#ifdef CONFIG_APCI_3120 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x818D)}, -#endif -#ifdef CONFIG_APCI_1032 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1003)}, -#endif -#ifdef CONFIG_APCI_1516 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1001)}, -#endif -#ifdef CONFIG_APCI_2016 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1002)}, -#endif -#ifdef CONFIG_APCI_2032 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1004)}, -#endif -#ifdef CONFIG_APCI_2200 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1005)}, -#endif -#ifdef CONFIG_APCI_1564 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1006)}, -#endif -#ifdef CONFIG_APCI_1500 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x80fc)}, -#endif -#ifdef CONFIG_APCI_3001 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x828D)}, -#endif -#ifdef CONFIG_APCI_3501 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3001)}, -#endif -#ifdef CONFIG_APCI_035 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x0300)}, -#endif -#ifdef CONFIG_APCI_3200 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3000)}, -#endif -#ifdef CONFIG_APCI_3300 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3007)}, -#endif -#ifdef CONFIG_APCI_1710 - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, APCI1710_BOARD_DEVICE_ID)}, -#endif -#ifdef CONFIG_APCI_16XX - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100A)}, -#endif -#ifdef CONFIG_APCI_3XXX - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3010)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300F)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300E)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3013)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3014)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3015)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3016)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3017)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3018)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3019)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301A)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301B)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301C)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301D)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301E)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301F)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3020)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3021)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3022)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3023)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300B)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3002)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3003)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3004)}, - {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3024)}, -#endif - {0} -}; - -MODULE_DEVICE_TABLE(pci, addi_apci_tbl); - static const struct addi_board boardtypes[] = { #ifdef CONFIG_APCI_3120 { diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c index 85c7ee4..36eb6ec 100644 --- a/drivers/staging/comedi/drivers/addi_apci_035.c +++ b/drivers/staging/comedi/drivers/addi_apci_035.c @@ -12,6 +12,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci035.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x0300) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c index e7a8f92f..67fe895 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1032.c +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci1032.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1003) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index c2a89c4..c60b18b 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci1500.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x80fc) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c index 2504b64..480f670 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1516.c +++ b/drivers/staging/comedi/drivers/addi_apci_1516.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci1516.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1001) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index a37b3c4..811647b 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci1564.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1006) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c index f8ef19f..3673772 100644 --- a/drivers/staging/comedi/drivers/addi_apci_16xx.c +++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c @@ -10,6 +10,14 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci16xx.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100a) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1710.c b/drivers/staging/comedi/drivers/addi_apci_1710.c index fb805d0..3402cf5 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1710.c +++ b/drivers/staging/comedi/drivers/addi_apci_1710.c @@ -22,4 +22,11 @@ static void fpu_end(void) #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_APCI1710.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, APCI1710_BOARD_DEVICE_ID) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" diff --git a/drivers/staging/comedi/drivers/addi_apci_2016.c b/drivers/staging/comedi/drivers/addi_apci_2016.c index bb2ee96..58d900f 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2016.c +++ b/drivers/staging/comedi/drivers/addi_apci_2016.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci2016.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1002) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c index 7733758..bc86d66 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2032.c +++ b/drivers/staging/comedi/drivers/addi_apci_2032.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci2032.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1004) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_2200.c b/drivers/staging/comedi/drivers/addi_apci_2200.c index ac13fc3..1b06ba6 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2200.c +++ b/drivers/staging/comedi/drivers/addi_apci_2200.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci2200.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1005) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3001.c b/drivers/staging/comedi/drivers/addi_apci_3001.c index 084dfcf..ec1d83d 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3001.c +++ b/drivers/staging/comedi/drivers/addi_apci_3001.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci3120.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x828d) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index 6324f745..d109306 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci3120.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x818d) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3200.c b/drivers/staging/comedi/drivers/addi_apci_3200.c index 34ac22a..d89453b 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3200.c +++ b/drivers/staging/comedi/drivers/addi_apci_3200.c @@ -22,4 +22,11 @@ static void fpu_end(void) #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci3200.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3000) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" diff --git a/drivers/staging/comedi/drivers/addi_apci_3300.c b/drivers/staging/comedi/drivers/addi_apci_3300.c index 5d3d567..b821573 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3300.c +++ b/drivers/staging/comedi/drivers/addi_apci_3300.c @@ -22,4 +22,11 @@ static void fpu_end(void) #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci3200.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3007) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index 8fb5b50..a1c6f01 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -10,6 +10,13 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci3501.c" + +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3001) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index c5205d3..9739b67 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -10,6 +10,36 @@ #include "addi-data/addi_eeprom.c" #include "addi-data/hwdrv_apci3xxx.c" +static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3010) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300f) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300e) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3013) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3014) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3015) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3016) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3017) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3018) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3019) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301a) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301b) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301c) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301d) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301e) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301f) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3020) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3021) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3022) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3023) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300B) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3002) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3003) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3004) }, + { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3024) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, addi_apci_tbl); + #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); -- 1.7.11 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel