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/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
@@ -3664,7 +3664,7 @@ static int __maybe_unused dfx_dev_unregister(struct device *);
|
||||
static int dfx_pci_register(struct pci_dev *, const struct pci_device_id *);
|
||||
static void dfx_pci_unregister(struct pci_dev *);
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(dfx_pci_table) = {
|
||||
static const struct pci_device_id dfx_pci_table[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_FDDI) },
|
||||
{ }
|
||||
};
|
||||
|
@@ -149,7 +149,7 @@ extern void mac_drv_rx_mode(struct s_smc *smc, int mode);
|
||||
extern void mac_drv_clear_rx_queue(struct s_smc *smc);
|
||||
extern void enable_tx_irq(struct s_smc *smc, u_short queue);
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(skfddi_pci_tbl) = {
|
||||
static const struct pci_device_id skfddi_pci_tbl[] = {
|
||||
{ PCI_VENDOR_ID_SK, PCI_DEVICE_ID_SK_FP, PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
Reference in New Issue
Block a user