staging/comedi/amplc: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
authorPeter Huewe <peterhuewe@gmx.de>
Sun, 6 Nov 2011 23:54:02 +0000 (00:54 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 02:39:37 +0000 (18:39 -0800)
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.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/amplc_dio200.c
drivers/staging/comedi/drivers/amplc_pc236.c
drivers/staging/comedi/drivers/amplc_pc263.c
drivers/staging/comedi/drivers/amplc_pci224.c
drivers/staging/comedi/drivers/amplc_pci230.c

index 93bbe4ec318da86e54a89ed72ed408e30c85e493..566cc44114526ca109340d6f857e1d568708fc1b 100644 (file)
@@ -421,12 +421,9 @@ static const struct dio200_layout_struct dio200_layouts[] = {
 
 #ifdef CONFIG_COMEDI_PCI
 static DEFINE_PCI_DEVICE_TABLE(dio200_pci_table) = {
-       {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI215,
-                   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI272,
-                   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {
-       0}
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI215) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI272) },
+       {0}
 };
 
 MODULE_DEVICE_TABLE(pci, dio200_pci_table);
index 48246cd50d470fa499eca602b553e90c272158bc..7972cadd403e921ac392857667a19609da48de1a 100644 (file)
@@ -134,10 +134,8 @@ static const struct pc236_board pc236_boards[] = {
 
 #ifdef CONFIG_COMEDI_PCI
 static DEFINE_PCI_DEVICE_TABLE(pc236_pci_table) = {
-       {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI236,
-                   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {
-       0}
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI236) },
+       {0}
 };
 
 MODULE_DEVICE_TABLE(pci, pc236_pci_table);
index 8a3388079094a6b4f9e5e5ae090ad7cca7810e86..191ac0d23ce760e1b947fd0a0e170227f01a6f6d 100644 (file)
@@ -101,10 +101,8 @@ static const struct pc263_board pc263_boards[] = {
 
 #ifdef CONFIG_COMEDI_PCI
 static DEFINE_PCI_DEVICE_TABLE(pc263_pci_table) = {
-       {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI263,
-                   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {
-       0}
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI263) },
+       {0}
 };
 
 MODULE_DEVICE_TABLE(pci, pc263_pci_table);
index 1b5ba1c2725929e3cd50c7692b9b6b50f1ecedbd..b278917cec25642c22389806aa4808981cf4b770 100644 (file)
@@ -384,12 +384,9 @@ static const struct pci224_board pci224_boards[] = {
  */
 
 static DEFINE_PCI_DEVICE_TABLE(pci224_pci_table) = {
-       {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI224,
-                   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI234,
-                   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {
-       0}
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI224) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_AMPLICON_PCI234) },
+       {0}
 };
 
 MODULE_DEVICE_TABLE(pci, pci224_pci_table);
index 7edeb1103dc86eabc1f4c8e32bb7ed94e7326e12..538979551c8ea1e1fcbd2b4798850e3e48ea52cc 100644 (file)
@@ -501,12 +501,9 @@ static const struct pci230_board pci230_boards[] = {
 };
 
 static DEFINE_PCI_DEVICE_TABLE(pci230_pci_table) = {
-       {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_PCI230, PCI_ANY_ID,
-                   PCI_ANY_ID, 0, 0, 0}, {
-       PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_PCI260, PCI_ANY_ID,
-                   PCI_ANY_ID, 0, 0, 0}, {
-       0}
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_PCI230) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMPLICON, PCI_DEVICE_ID_PCI260) },
+       {0}
 };
 
 MODULE_DEVICE_TABLE(pci, pci230_pci_table);