From 9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1 Mon Sep 17 00:00:00 2001 From: Benoit Taine Date: Fri, 8 Aug 2014 15:56:03 +0200 Subject: PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine Signed-off-by: Bjorn Helgaas --- drivers/net/ethernet/dec/tulip/tulip_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/ethernet/dec/tulip/tulip_core.c') diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c index 861660841ce2..3b42556f7f8d 100644 --- a/drivers/net/ethernet/dec/tulip/tulip_core.c +++ b/drivers/net/ethernet/dec/tulip/tulip_core.c @@ -207,7 +207,7 @@ struct tulip_chip_table tulip_tbl[] = { }; -static DEFINE_PCI_DEVICE_TABLE(tulip_pci_tbl) = { +static const struct pci_device_id tulip_pci_tbl[] = { { 0x1011, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DC21140 }, { 0x1011, 0x0019, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DC21143 }, { 0x11AD, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, LC82C168 }, @@ -1294,7 +1294,7 @@ static const struct net_device_ops tulip_netdev_ops = { #endif }; -DEFINE_PCI_DEVICE_TABLE(early_486_chipsets) = { +const struct pci_device_id early_486_chipsets[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, { }, -- cgit v1.2.3-59-g8ed1b