diff options
author | Benoit Taine <benoit.taine@lip6.fr> | 2014-08-08 15:56:03 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-08-12 12:15:14 -0600 |
commit | 9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1 (patch) | |
tree | 2c6f874e1eb4dbb415ad96b6a39f1f7982655412 /drivers/scsi | |
parent | c8d6637d0497d62093dbba0694c7b3a80b79bfe1 (diff) | |
download | blackbird-op-linux-9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1.tar.gz blackbird-op-linux-9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1.zip |
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/BusLogic.c | 2 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 2 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 | ||||
-rw-r--r-- | drivers/scsi/mvumi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ufs/ufshcd-pci.c | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 972f8176665f..64c75143c89a 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -3893,7 +3893,7 @@ __setup("BusLogic=", blogic_setup); PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { } };*/ -static DEFINE_PCI_DEVICE_TABLE(blogic_pci_tbl) = { +static const struct pci_device_id blogic_pci_tbl[] = { {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER)}, {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC)}, {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT)}, diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index eb3e3e619155..915c26b23ab6 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -539,7 +539,7 @@ static umode_t beiscsi_eth_get_attr_visibility(void *data, int type) } /*------------------- PCI Driver operations and data ----------------- */ -static DEFINE_PCI_DEVICE_TABLE(beiscsi_pci_id_table) = { +static const struct pci_device_id beiscsi_pci_id_table[] = { { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) }, { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID2) }, { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) }, diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c index 1aafc331ee63..17794add855c 100644 --- a/drivers/scsi/csiostor/csio_init.c +++ b/drivers/scsi/csiostor/csio_init.c @@ -1167,7 +1167,7 @@ static struct pci_error_handlers csio_err_handler = { .resume = csio_pci_resume, }; -static DEFINE_PCI_DEVICE_TABLE(csio_pci_tbl) = { +static const struct pci_device_id csio_pci_tbl[] = { CSIO_DEVICE(CSIO_DEVID_T440DBG_FCOE, 0), /* T4 DEBUG FCOE */ CSIO_DEVICE(CSIO_DEVID_T420CR_FCOE, 0), /* T420CR FCOE */ CSIO_DEVICE(CSIO_DEVID_T422CR_FCOE, 0), /* T422CR FCOE */ diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index 4198e45ea941..2e890b1e2526 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c @@ -75,7 +75,7 @@ MODULE_VERSION(DRV_VERSION); static struct scsi_transport_template *isci_transport_template; -static DEFINE_PCI_DEVICE_TABLE(isci_id_table) = { +static const struct pci_device_id isci_id_table[] = { { PCI_VDEVICE(INTEL, 0x1D61),}, { PCI_VDEVICE(INTEL, 0x1D63),}, { PCI_VDEVICE(INTEL, 0x1D65),}, diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 7cf48c5c15a7..135f12c20ecf 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -247,7 +247,7 @@ struct _scsi_io_transfer { /* * The pci device ids are defined in mpi/mpi2_cnfg.h. */ -static DEFINE_PCI_DEVICE_TABLE(scsih_pci_table) = { +static const struct pci_device_id scsih_pci_table[] = { /* Fury ~ 3004 and 3008 */ { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3004, PCI_ANY_ID, PCI_ANY_ID }, diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 3e716b2f611a..3e6b866759fe 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -48,7 +48,7 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("jyli@marvell.com"); MODULE_DESCRIPTION("Marvell UMI Driver"); -static DEFINE_PCI_DEVICE_TABLE(mvumi_pci_table) = { +static const struct pci_device_id mvumi_pci_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, PCI_DEVICE_ID_MARVELL_MV9143) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, PCI_DEVICE_ID_MARVELL_MV9580) }, { 0 } diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index c007a7a69c28..afaabe2aeac8 100644 --- a/drivers/scsi/ufs/ufshcd-pci.c +++ b/drivers/scsi/ufs/ufshcd-pci.c @@ -185,7 +185,7 @@ static const struct dev_pm_ops ufshcd_pci_pm_ops = { .runtime_idle = ufshcd_pci_runtime_idle, }; -static DEFINE_PCI_DEVICE_TABLE(ufshcd_pci_tbl) = { +static const struct pci_device_id ufshcd_pci_tbl[] = { { PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { } /* terminate list */ }; |