Commit 3527bd50 authored by Axel Lin's avatar Axel Lin Committed by Jean Delvare

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: default avatarAxel Lin <axel.lin@gmail.com>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Ben Dooks <ben-linux@fluff.org>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Acked-by: default avatarDirk Brandewie <dirk.brandewie@gmail.com>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 65a2d74b
...@@ -417,7 +417,7 @@ static void __devexit ali1563_remove(struct pci_dev * dev) ...@@ -417,7 +417,7 @@ static void __devexit ali1563_remove(struct pci_dev * dev)
ali1563_shutdown(dev); ali1563_shutdown(dev);
} }
static const struct pci_device_id ali1563_id_table[] __devinitconst = { static DEFINE_PCI_DEVICE_TABLE(ali1563_id_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1563) }, { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1563) },
{}, {},
}; };
......
...@@ -477,7 +477,7 @@ static struct i2c_adapter ali15x3_adapter = { ...@@ -477,7 +477,7 @@ static struct i2c_adapter ali15x3_adapter = {
.algo = &smbus_algorithm, .algo = &smbus_algorithm,
}; };
static const struct pci_device_id ali15x3_ids[] = { static DEFINE_PCI_DEVICE_TABLE(ali15x3_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) }, { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
{ 0, } { 0, }
}; };
......
...@@ -308,7 +308,7 @@ static const char* chipname[] = { ...@@ -308,7 +308,7 @@ static const char* chipname[] = {
"nVidia nForce", "AMD8111", "nVidia nForce", "AMD8111",
}; };
static const struct pci_device_id amd756_ids[] = { static DEFINE_PCI_DEVICE_TABLE(amd756_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B), { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B),
.driver_data = AMD756 }, .driver_data = AMD756 },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413), { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413),
......
...@@ -415,7 +415,7 @@ static const struct i2c_algorithm smbus_algorithm = { ...@@ -415,7 +415,7 @@ static const struct i2c_algorithm smbus_algorithm = {
}; };
static const struct pci_device_id amd8111_ids[] = { static DEFINE_PCI_DEVICE_TABLE(amd8111_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS2) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS2) },
{ 0, } { 0, }
}; };
......
...@@ -349,7 +349,7 @@ static void __devexit i2c_dw_pci_remove(struct pci_dev *pdev) ...@@ -349,7 +349,7 @@ static void __devexit i2c_dw_pci_remove(struct pci_dev *pdev)
/* work with hotplug and coldplug */ /* work with hotplug and coldplug */
MODULE_ALIAS("i2c_designware-pci"); MODULE_ALIAS("i2c_designware-pci");
DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = { static DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = {
/* Moorestown */ /* Moorestown */
{ PCI_VDEVICE(INTEL, 0x0802), moorestown_0 }, { PCI_VDEVICE(INTEL, 0x0802), moorestown_0 },
{ PCI_VDEVICE(INTEL, 0x0803), moorestown_1 }, { PCI_VDEVICE(INTEL, 0x0803), moorestown_1 },
......
...@@ -185,7 +185,7 @@ static DEFINE_MUTEX(pch_mutex); ...@@ -185,7 +185,7 @@ static DEFINE_MUTEX(pch_mutex);
#define PCI_DEVICE_ID_ML7213_I2C 0x802D #define PCI_DEVICE_ID_ML7213_I2C 0x802D
#define PCI_DEVICE_ID_ML7223_I2C 0x8010 #define PCI_DEVICE_ID_ML7223_I2C 0x8010
static struct pci_device_id __devinitdata pch_pcidev_id[] = { static DEFINE_PCI_DEVICE_TABLE(pch_pcidev_id) = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH_I2C), 1, }, { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH_I2C), 1, },
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_I2C), 2, }, { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_I2C), 2, },
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_I2C), 1, }, { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_I2C), 1, },
......
...@@ -105,7 +105,7 @@ static struct i2c_adapter hydra_adap = { ...@@ -105,7 +105,7 @@ static struct i2c_adapter hydra_adap = {
.algo_data = &hydra_bit_data, .algo_data = &hydra_bit_data,
}; };
static const struct pci_device_id hydra_ids[] = { static DEFINE_PCI_DEVICE_TABLE(hydra_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_HYDRA) }, { PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_HYDRA) },
{ 0, } { 0, }
}; };
......
...@@ -609,7 +609,7 @@ static const struct i2c_algorithm smbus_algorithm = { ...@@ -609,7 +609,7 @@ static const struct i2c_algorithm smbus_algorithm = {
.functionality = i801_func, .functionality = i801_func,
}; };
static const struct pci_device_id i801_ids[] = { static DEFINE_PCI_DEVICE_TABLE(i801_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_3) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_3) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_3) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_3) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_2) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_2) },
......
...@@ -1093,7 +1093,7 @@ static void __devexit intel_mid_i2c_remove(struct pci_dev *dev) ...@@ -1093,7 +1093,7 @@ static void __devexit intel_mid_i2c_remove(struct pci_dev *dev)
pci_release_region(dev, 0); pci_release_region(dev, 0);
} }
static struct pci_device_id intel_mid_i2c_ids[] = { static DEFINE_PCI_DEVICE_TABLE(intel_mid_i2c_ids) = {
/* Moorestown */ /* Moorestown */
{ PCI_VDEVICE(INTEL, 0x0802), 0 }, { PCI_VDEVICE(INTEL, 0x0802), 0 },
{ PCI_VDEVICE(INTEL, 0x0803), 1 }, { PCI_VDEVICE(INTEL, 0x0803), 1 },
......
...@@ -309,7 +309,7 @@ static struct i2c_algorithm smbus_algorithm = { ...@@ -309,7 +309,7 @@ static struct i2c_algorithm smbus_algorithm = {
}; };
static const struct pci_device_id nforce2_ids[] = { static DEFINE_PCI_DEVICE_TABLE(nforce2_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) },
......
...@@ -401,7 +401,7 @@ static void __devexit pasemi_smb_remove(struct pci_dev *dev) ...@@ -401,7 +401,7 @@ static void __devexit pasemi_smb_remove(struct pci_dev *dev)
kfree(smbus); kfree(smbus);
} }
static const struct pci_device_id pasemi_smb_ids[] = { static DEFINE_PCI_DEVICE_TABLE(pasemi_smb_ids) = {
{ PCI_DEVICE(0x1959, 0xa003) }, { PCI_DEVICE(0x1959, 0xa003) },
{ 0, } { 0, }
}; };
......
...@@ -472,7 +472,7 @@ static struct i2c_adapter piix4_adapter = { ...@@ -472,7 +472,7 @@ static struct i2c_adapter piix4_adapter = {
.algo = &smbus_algorithm, .algo = &smbus_algorithm,
}; };
static const struct pci_device_id piix4_ids[] = { static DEFINE_PCI_DEVICE_TABLE(piix4_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3) },
{ PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_3) }, { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_3) },
......
...@@ -150,7 +150,7 @@ static void __devexit ce4100_i2c_remove(struct pci_dev *dev) ...@@ -150,7 +150,7 @@ static void __devexit ce4100_i2c_remove(struct pci_dev *dev)
kfree(sds); kfree(sds);
} }
static struct pci_device_id ce4100_i2c_devices[] __devinitdata = { static DEFINE_PCI_DEVICE_TABLE(ce4100_i2c_devices) = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2e68)}, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2e68)},
{ }, { },
}; };
......
...@@ -369,7 +369,7 @@ static struct i2c_adapter sis5595_adapter = { ...@@ -369,7 +369,7 @@ static struct i2c_adapter sis5595_adapter = {
.algo = &smbus_algorithm, .algo = &smbus_algorithm,
}; };
static const struct pci_device_id sis5595_ids[] __devinitconst = { static DEFINE_PCI_DEVICE_TABLE(sis5595_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) }, { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
{ 0, } { 0, }
}; };
......
...@@ -472,7 +472,7 @@ static struct i2c_adapter sis630_adapter = { ...@@ -472,7 +472,7 @@ static struct i2c_adapter sis630_adapter = {
.algo = &smbus_algorithm, .algo = &smbus_algorithm,
}; };
static const struct pci_device_id sis630_ids[] __devinitconst = { static DEFINE_PCI_DEVICE_TABLE(sis630_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) }, { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC) }, { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC) },
{ 0, } { 0, }
......
...@@ -245,7 +245,7 @@ static struct i2c_adapter sis96x_adapter = { ...@@ -245,7 +245,7 @@ static struct i2c_adapter sis96x_adapter = {
.algo = &smbus_algorithm, .algo = &smbus_algorithm,
}; };
static const struct pci_device_id sis96x_ids[] = { static DEFINE_PCI_DEVICE_TABLE(sis96x_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_SMBUS) },
{ 0, } { 0, }
}; };
......
...@@ -89,7 +89,7 @@ static struct i2c_adapter vt586b_adapter = { ...@@ -89,7 +89,7 @@ static struct i2c_adapter vt586b_adapter = {
}; };
static const struct pci_device_id vt586b_ids[] __devinitconst = { static DEFINE_PCI_DEVICE_TABLE(vt586b_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3) }, { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3) },
{ 0, } { 0, }
}; };
......
...@@ -441,7 +441,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev, ...@@ -441,7 +441,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
return error; return error;
} }
static const struct pci_device_id vt596_ids[] = { static DEFINE_PCI_DEVICE_TABLE(vt596_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_3), { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_3),
.driver_data = SMBBA1 }, .driver_data = SMBBA1 },
{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596B_3), { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596B_3),
......
...@@ -559,7 +559,7 @@ static struct platform_driver scx200_pci_driver = { ...@@ -559,7 +559,7 @@ static struct platform_driver scx200_pci_driver = {
.remove = __devexit_p(scx200_remove), .remove = __devexit_p(scx200_remove),
}; };
static const struct pci_device_id scx200_isa[] __initconst = { static DEFINE_PCI_DEVICE_TABLE(scx200_isa) = {
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) }, { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) },
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) }, { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) },
{ 0, } { 0, }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment