staging/comedi/addi: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.

Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.

Moreover the hardcoded 0x15B8 was replaced by the more readable
PCI_VENDOR_ID_ADDIDATA

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Peter Huewe 2011-11-06 23:48:17 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель cf5682788f
Коммит d9fcd77b56
1 изменённых файлов: 68 добавлений и 69 удалений

Просмотреть файл

@ -145,78 +145,77 @@ void fpu_end(void)
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
#ifdef CONFIG_APCI_3120 #ifdef CONFIG_APCI_3120
{APCI3120_BOARD_VENDOR_ID, 0x818D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI3120_BOARD_VENDOR_ID, 0x818D)},
#endif #endif
#ifdef CONFIG_APCI_1032 #ifdef CONFIG_APCI_1032
{APCI1032_BOARD_VENDOR_ID, 0x1003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI1032_BOARD_VENDOR_ID, 0x1003)},
#endif #endif
#ifdef CONFIG_APCI_1516 #ifdef CONFIG_APCI_1516
{APCI1516_BOARD_VENDOR_ID, 0x1001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI1516_BOARD_VENDOR_ID, 0x1001)},
#endif #endif
#ifdef CONFIG_APCI_2016 #ifdef CONFIG_APCI_2016
{APCI2016_BOARD_VENDOR_ID, 0x1002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI2016_BOARD_VENDOR_ID, 0x1002)},
#endif #endif
#ifdef CONFIG_APCI_2032 #ifdef CONFIG_APCI_2032
{APCI2032_BOARD_VENDOR_ID, 0x1004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI2032_BOARD_VENDOR_ID, 0x1004)},
#endif #endif
#ifdef CONFIG_APCI_2200 #ifdef CONFIG_APCI_2200
{APCI2200_BOARD_VENDOR_ID, 0x1005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI2200_BOARD_VENDOR_ID, 0x1005)},
#endif #endif
#ifdef CONFIG_APCI_1564 #ifdef CONFIG_APCI_1564
{APCI1564_BOARD_VENDOR_ID, 0x1006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI1564_BOARD_VENDOR_ID, 0x1006)},
#endif #endif
#ifdef CONFIG_APCI_1500 #ifdef CONFIG_APCI_1500
{APCI1500_BOARD_VENDOR_ID, 0x80fc, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI1500_BOARD_VENDOR_ID, 0x80fc)},
#endif #endif
#ifdef CONFIG_APCI_3001 #ifdef CONFIG_APCI_3001
{APCI3120_BOARD_VENDOR_ID, 0x828D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI3120_BOARD_VENDOR_ID, 0x828D)},
#endif #endif
#ifdef CONFIG_APCI_3501 #ifdef CONFIG_APCI_3501
{APCI3501_BOARD_VENDOR_ID, 0x3001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI3501_BOARD_VENDOR_ID, 0x3001)},
#endif #endif
#ifdef CONFIG_APCI_035 #ifdef CONFIG_APCI_035
{APCI035_BOARD_VENDOR_ID, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI035_BOARD_VENDOR_ID, 0x0300)},
#endif #endif
#ifdef CONFIG_APCI_3200 #ifdef CONFIG_APCI_3200
{APCI3200_BOARD_VENDOR_ID, 0x3000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI3200_BOARD_VENDOR_ID, 0x3000)},
#endif #endif
#ifdef CONFIG_APCI_3300 #ifdef CONFIG_APCI_3300
{APCI3200_BOARD_VENDOR_ID, 0x3007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(APCI3200_BOARD_VENDOR_ID, 0x3007)},
#endif #endif
#ifdef CONFIG_APCI_1710 #ifdef CONFIG_APCI_1710
{APCI1710_BOARD_VENDOR_ID, APCI1710_BOARD_DEVICE_ID, {PCI_DEVICE(APCI1710_BOARD_VENDOR_ID, APCI1710_BOARD_DEVICE_ID)},
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
#endif #endif
#ifdef CONFIG_APCI_16XX #ifdef CONFIG_APCI_16XX
{0x15B8, 0x1009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009)},
{0x15B8, 0x100A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100A)},
#endif #endif
#ifdef CONFIG_APCI_3XXX #ifdef CONFIG_APCI_3XXX
{0x15B8, 0x3010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3010)},
{0x15B8, 0x300F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300F)},
{0x15B8, 0x300E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300E)},
{0x15B8, 0x3013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3013)},
{0x15B8, 0x3014, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3014)},
{0x15B8, 0x3015, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3015)},
{0x15B8, 0x3016, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3016)},
{0x15B8, 0x3017, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3017)},
{0x15B8, 0x3018, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3018)},
{0x15B8, 0x3019, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3019)},
{0x15B8, 0x301A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301A)},
{0x15B8, 0x301B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301B)},
{0x15B8, 0x301C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301C)},
{0x15B8, 0x301D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301D)},
{0x15B8, 0x301E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301E)},
{0x15B8, 0x301F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x301F)},
{0x15B8, 0x3020, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3020)},
{0x15B8, 0x3021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3021)},
{0x15B8, 0x3022, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3022)},
{0x15B8, 0x3023, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3023)},
{0x15B8, 0x300B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300B)},
{0x15B8, 0x3002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3002)},
{0x15B8, 0x3003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3003)},
{0x15B8, 0x3004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3004)},
{0x15B8, 0x3024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3024)},
#endif #endif
{0} {0}
}; };
@ -1019,7 +1018,7 @@ static const struct addi_board boardtypes[] = {
#endif #endif
#ifdef CONFIG_APCI_16XX #ifdef CONFIG_APCI_16XX
{"apci1648", {"apci1648",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x1009, 0x1009,
128, 128,
0, 0,
@ -1075,7 +1074,7 @@ static const struct addi_board boardtypes[] = {
i_APCI16XX_InsnBitsWriteTTLIO}, i_APCI16XX_InsnBitsWriteTTLIO},
{"apci1696", {"apci1696",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x100A, 0x100A,
128, 128,
0, 0,
@ -1132,7 +1131,7 @@ static const struct addi_board boardtypes[] = {
#endif #endif
#ifdef CONFIG_APCI_3XXX #ifdef CONFIG_APCI_3XXX
{"apci3000-16", {"apci3000-16",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3010, 0x3010,
256, 256,
256, 256,
@ -1188,7 +1187,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3000-8", {"apci3000-8",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x300F, 0x300F,
256, 256,
256, 256,
@ -1244,7 +1243,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3000-4", {"apci3000-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x300E, 0x300E,
256, 256,
256, 256,
@ -1300,7 +1299,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3006-16", {"apci3006-16",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3013, 0x3013,
256, 256,
256, 256,
@ -1356,7 +1355,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3006-8", {"apci3006-8",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3014, 0x3014,
256, 256,
256, 256,
@ -1412,7 +1411,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3006-4", {"apci3006-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3015, 0x3015,
256, 256,
256, 256,
@ -1468,7 +1467,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3010-16", {"apci3010-16",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3016, 0x3016,
256, 256,
256, 256,
@ -1524,7 +1523,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3010-8", {"apci3010-8",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3017, 0x3017,
256, 256,
256, 256,
@ -1580,7 +1579,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3010-4", {"apci3010-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3018, 0x3018,
256, 256,
256, 256,
@ -1636,7 +1635,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3016-16", {"apci3016-16",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3019, 0x3019,
256, 256,
256, 256,
@ -1692,7 +1691,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3016-8", {"apci3016-8",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x301A, 0x301A,
256, 256,
256, 256,
@ -1748,7 +1747,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3016-4", {"apci3016-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x301B, 0x301B,
256, 256,
256, 256,
@ -1804,7 +1803,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3100-16-4", {"apci3100-16-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x301C, 0x301C,
256, 256,
256, 256,
@ -1860,7 +1859,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3100-8-4", {"apci3100-8-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x301D, 0x301D,
256, 256,
256, 256,
@ -1916,7 +1915,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3106-16-4", {"apci3106-16-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x301E, 0x301E,
256, 256,
256, 256,
@ -1972,7 +1971,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3106-8-4", {"apci3106-8-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x301F, 0x301F,
256, 256,
256, 256,
@ -2028,7 +2027,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3110-16-4", {"apci3110-16-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3020, 0x3020,
256, 256,
256, 256,
@ -2084,7 +2083,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3110-8-4", {"apci3110-8-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3021, 0x3021,
256, 256,
256, 256,
@ -2140,7 +2139,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3116-16-4", {"apci3116-16-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3022, 0x3022,
256, 256,
256, 256,
@ -2196,7 +2195,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3116-8-4", {"apci3116-8-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3023, 0x3023,
256, 256,
256, 256,
@ -2252,7 +2251,7 @@ static const struct addi_board boardtypes[] = {
i_APCI3XXX_InsnWriteTTLIO}, i_APCI3XXX_InsnWriteTTLIO},
{"apci3003", {"apci3003",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x300B, 0x300B,
256, 256,
256, 256,
@ -2307,7 +2306,7 @@ static const struct addi_board boardtypes[] = {
NULL}, NULL},
{"apci3002-16", {"apci3002-16",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3002, 0x3002,
256, 256,
256, 256,
@ -2362,7 +2361,7 @@ static const struct addi_board boardtypes[] = {
NULL}, NULL},
{"apci3002-8", {"apci3002-8",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3003, 0x3003,
256, 256,
256, 256,
@ -2417,7 +2416,7 @@ static const struct addi_board boardtypes[] = {
NULL}, NULL},
{"apci3002-4", {"apci3002-4",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3004, 0x3004,
256, 256,
256, 256,
@ -2472,7 +2471,7 @@ static const struct addi_board boardtypes[] = {
NULL}, NULL},
{"apci3500", {"apci3500",
0x15B8, PCI_VENDOR_ID_ADDIDATA,
0x3024, 0x3024,
256, 256,
256, 256,