Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ static void __devexit ali1563_remove(struct pci_dev * 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) },
	{},
};
+1 −1
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@ static struct i2c_adapter ali15x3_adapter = {
	.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) },
	{ 0, }
};
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static const char* chipname[] = {
	"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),
	  .driver_data = AMD756 },
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413),
+1 −1
Original line number Diff line number Diff line
@@ -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) },
	{ 0, }
};
+1 −1
Original line number Diff line number Diff line
@@ -349,7 +349,7 @@ static void __devexit i2c_dw_pci_remove(struct pci_dev *pdev)
/* work with hotplug and coldplug */
MODULE_ALIAS("i2c_designware-pci");

DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = {
static DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = {
	/* Moorestown */
	{ PCI_VDEVICE(INTEL, 0x0802), moorestown_0 },
	{ PCI_VDEVICE(INTEL, 0x0803), moorestown_1 },
Loading