Commit 3527bd5045aacb4e4072f9cacb8eb9a433fbad39
Committed by
Jean Delvare
1 parent
65a2d74b76
Exists in
master
and in
6 other branches
i2c: Convert to DEFINE_PCI_DEVICE_TABLE
Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE tables. Use DEFINE_PCI_DEVICE_TABLE ensures we make the pci_device_id table const and marked as __devinitconst. This also fixes some warnings from checkpatch: e.g. WARNING: Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id #1096: FILE: i2c/busses/i2c-intel-mid.c:1096: +static struct pci_device_id intel_mid_i2c_ids[] = { Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Olof Johansson <olof@lixom.net> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Acked-by: Dirk Brandewie <dirk.brandewie@gmail.com> Cc: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Feng Tang <feng.tang@intel.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Showing 19 changed files with 19 additions and 19 deletions Side-by-side Diff
- drivers/i2c/busses/i2c-ali1563.c
- drivers/i2c/busses/i2c-ali15x3.c
- drivers/i2c/busses/i2c-amd756.c
- drivers/i2c/busses/i2c-amd8111.c
- drivers/i2c/busses/i2c-designware-pcidrv.c
- drivers/i2c/busses/i2c-eg20t.c
- drivers/i2c/busses/i2c-hydra.c
- drivers/i2c/busses/i2c-i801.c
- drivers/i2c/busses/i2c-intel-mid.c
- drivers/i2c/busses/i2c-nforce2.c
- drivers/i2c/busses/i2c-pasemi.c
- drivers/i2c/busses/i2c-piix4.c
- drivers/i2c/busses/i2c-pxa-pci.c
- drivers/i2c/busses/i2c-sis5595.c
- drivers/i2c/busses/i2c-sis630.c
- drivers/i2c/busses/i2c-sis96x.c
- drivers/i2c/busses/i2c-via.c
- drivers/i2c/busses/i2c-viapro.c
- drivers/i2c/busses/scx200_acb.c
drivers/i2c/busses/i2c-ali1563.c
... | ... | @@ -417,7 +417,7 @@ |
417 | 417 | ali1563_shutdown(dev); |
418 | 418 | } |
419 | 419 | |
420 | -static const struct pci_device_id ali1563_id_table[] __devinitconst = { | |
420 | +static DEFINE_PCI_DEVICE_TABLE(ali1563_id_table) = { | |
421 | 421 | { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1563) }, |
422 | 422 | {}, |
423 | 423 | }; |
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-amd756.c
... | ... | @@ -308,7 +308,7 @@ |
308 | 308 | "nVidia nForce", "AMD8111", |
309 | 309 | }; |
310 | 310 | |
311 | -static const struct pci_device_id amd756_ids[] = { | |
311 | +static DEFINE_PCI_DEVICE_TABLE(amd756_ids) = { | |
312 | 312 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B), |
313 | 313 | .driver_data = AMD756 }, |
314 | 314 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413), |
drivers/i2c/busses/i2c-amd8111.c
drivers/i2c/busses/i2c-designware-pcidrv.c
... | ... | @@ -349,7 +349,7 @@ |
349 | 349 | /* work with hotplug and coldplug */ |
350 | 350 | MODULE_ALIAS("i2c_designware-pci"); |
351 | 351 | |
352 | -DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = { | |
352 | +static DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = { | |
353 | 353 | /* Moorestown */ |
354 | 354 | { PCI_VDEVICE(INTEL, 0x0802), moorestown_0 }, |
355 | 355 | { PCI_VDEVICE(INTEL, 0x0803), moorestown_1 }, |
drivers/i2c/busses/i2c-eg20t.c
... | ... | @@ -185,7 +185,7 @@ |
185 | 185 | #define PCI_DEVICE_ID_ML7213_I2C 0x802D |
186 | 186 | #define PCI_DEVICE_ID_ML7223_I2C 0x8010 |
187 | 187 | |
188 | -static struct pci_device_id __devinitdata pch_pcidev_id[] = { | |
188 | +static DEFINE_PCI_DEVICE_TABLE(pch_pcidev_id) = { | |
189 | 189 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH_I2C), 1, }, |
190 | 190 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_I2C), 2, }, |
191 | 191 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_I2C), 1, }, |
drivers/i2c/busses/i2c-hydra.c
drivers/i2c/busses/i2c-i801.c
... | ... | @@ -609,7 +609,7 @@ |
609 | 609 | .functionality = i801_func, |
610 | 610 | }; |
611 | 611 | |
612 | -static const struct pci_device_id i801_ids[] = { | |
612 | +static DEFINE_PCI_DEVICE_TABLE(i801_ids) = { | |
613 | 613 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_3) }, |
614 | 614 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_3) }, |
615 | 615 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_2) }, |
drivers/i2c/busses/i2c-intel-mid.c
... | ... | @@ -1093,7 +1093,7 @@ |
1093 | 1093 | pci_release_region(dev, 0); |
1094 | 1094 | } |
1095 | 1095 | |
1096 | -static struct pci_device_id intel_mid_i2c_ids[] = { | |
1096 | +static DEFINE_PCI_DEVICE_TABLE(intel_mid_i2c_ids) = { | |
1097 | 1097 | /* Moorestown */ |
1098 | 1098 | { PCI_VDEVICE(INTEL, 0x0802), 0 }, |
1099 | 1099 | { PCI_VDEVICE(INTEL, 0x0803), 1 }, |
drivers/i2c/busses/i2c-nforce2.c
... | ... | @@ -309,7 +309,7 @@ |
309 | 309 | }; |
310 | 310 | |
311 | 311 | |
312 | -static const struct pci_device_id nforce2_ids[] = { | |
312 | +static DEFINE_PCI_DEVICE_TABLE(nforce2_ids) = { | |
313 | 313 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS) }, |
314 | 314 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) }, |
315 | 315 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) }, |
drivers/i2c/busses/i2c-pasemi.c
drivers/i2c/busses/i2c-piix4.c
... | ... | @@ -472,7 +472,7 @@ |
472 | 472 | .algo = &smbus_algorithm, |
473 | 473 | }; |
474 | 474 | |
475 | -static const struct pci_device_id piix4_ids[] = { | |
475 | +static DEFINE_PCI_DEVICE_TABLE(piix4_ids) = { | |
476 | 476 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3) }, |
477 | 477 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3) }, |
478 | 478 | { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_3) }, |
drivers/i2c/busses/i2c-pxa-pci.c
drivers/i2c/busses/i2c-sis5595.c
drivers/i2c/busses/i2c-sis630.c
... | ... | @@ -472,7 +472,7 @@ |
472 | 472 | .algo = &smbus_algorithm, |
473 | 473 | }; |
474 | 474 | |
475 | -static const struct pci_device_id sis630_ids[] __devinitconst = { | |
475 | +static DEFINE_PCI_DEVICE_TABLE(sis630_ids) = { | |
476 | 476 | { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) }, |
477 | 477 | { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC) }, |
478 | 478 | { 0, } |
drivers/i2c/busses/i2c-sis96x.c
drivers/i2c/busses/i2c-via.c
drivers/i2c/busses/i2c-viapro.c
... | ... | @@ -441,7 +441,7 @@ |
441 | 441 | return error; |
442 | 442 | } |
443 | 443 | |
444 | -static const struct pci_device_id vt596_ids[] = { | |
444 | +static DEFINE_PCI_DEVICE_TABLE(vt596_ids) = { | |
445 | 445 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_3), |
446 | 446 | .driver_data = SMBBA1 }, |
447 | 447 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596B_3), |
drivers/i2c/busses/scx200_acb.c
... | ... | @@ -559,7 +559,7 @@ |
559 | 559 | .remove = __devexit_p(scx200_remove), |
560 | 560 | }; |
561 | 561 | |
562 | -static const struct pci_device_id scx200_isa[] __initconst = { | |
562 | +static DEFINE_PCI_DEVICE_TABLE(scx200_isa) = { | |
563 | 563 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) }, |
564 | 564 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) }, |
565 | 565 | { 0, } |