[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1322794977.25851.1.camel@phoenix>
Date: Fri, 02 Dec 2011 11:02:57 +0800
From: Axel Lin <axel.lin@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Jiri Slaby <jirislaby@...il.com>, Alex Dubov <oakad@...oo.com>,
David Altobelli <david.altobelli@...com>,
Brent Casavant <bcasavan@....com>,
J Freyensee <james_p_freyensee@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <greg@...ah.com>
Subject: [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE
Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE
tables. Also convert to the PCI_DEVICE/PCI_VDEVICE macros for better
readablity.
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Greg Kroah-Hartman <greg@...ah.com>
Cc: David Altobelli <david.altobelli@...com>
Cc: Brent Casavant <bcasavan@....com>
Cc: Jiri Slaby <jirislaby@...il.com>
Cc: J Freyensee <james_p_freyensee@...ux.intel.com>
Cc: Alex Dubov <oakad@...oo.com>
Signed-off-by: Axel Lin <axel.lin@...il.com>
---
drivers/misc/hpilo.c | 2 +-
drivers/misc/ioc4.c | 6 +++---
drivers/misc/pch_phub.c | 2 +-
drivers/misc/phantom.c | 2 +-
drivers/misc/pti.c | 2 +-
drivers/misc/tifm_7xx1.c | 11 ++++-------
6 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index fffc227..f705cbb 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -828,7 +828,7 @@ out:
return error;
}
-static struct pci_device_id ilo_devices[] = {
+static DEFINE_PCI_DEVICE_TABLE(ilo_devices) = {
{ PCI_DEVICE(PCI_VENDOR_ID_COMPAQ, 0xB204) },
{ PCI_DEVICE(PCI_VENDOR_ID_HP, 0x3307) },
{ }
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c
index df03dd3..46adc36 100644
--- a/drivers/misc/ioc4.c
+++ b/drivers/misc/ioc4.c
@@ -456,9 +456,9 @@ ioc4_remove(struct pci_dev *pdev)
kfree(idd);
}
-static struct pci_device_id ioc4_id_table[] = {
- {PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC4, PCI_ANY_ID,
- PCI_ANY_ID, 0x0b4000, 0xFFFFFF},
+static DEFINE_PCI_DEVICE_TABLE(ioc4_id_table) = {
+ { PCI_DEVICE(PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC4),
+ .class = 0x0b4000, .class_mask = 0xFFFFFF },
{0}
};
diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c
index 10fc478..daa19c2 100644
--- a/drivers/misc/pch_phub.c
+++ b/drivers/misc/pch_phub.c
@@ -878,7 +878,7 @@ static int pch_phub_resume(struct pci_dev *pdev)
#define pch_phub_resume NULL
#endif /* CONFIG_PM */
-static struct pci_device_id pch_phub_pcidev_id[] = {
+static DEFINE_PCI_DEVICE_TABLE(pch_phub_pcidev_id) = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH1_PHUB), 1, },
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7213_PHUB), 2, },
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7223_mPHUB), 3, },
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c
index 21b28fc..7f12ee6 100644
--- a/drivers/misc/phantom.c
+++ b/drivers/misc/phantom.c
@@ -487,7 +487,7 @@ static int phantom_resume(struct pci_dev *pdev)
#define phantom_resume NULL
#endif
-static struct pci_device_id phantom_pci_tbl[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(phantom_pci_tbl) = {
{ .vendor = PCI_VENDOR_ID_PLX, .device = PCI_DEVICE_ID_PLX_9050,
.subvendor = PCI_VENDOR_ID_PLX, .subdevice = PCI_DEVICE_ID_PLX_9050,
.class = PCI_CLASS_BRIDGE_OTHER << 8, .class_mask = 0xffff00 },
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
index 0b56e3f..03843e3 100644
--- a/drivers/misc/pti.c
+++ b/drivers/misc/pti.c
@@ -76,7 +76,7 @@ struct pti_dev {
*/
static DEFINE_MUTEX(alloclock);
-static struct pci_device_id pci_ids[] __devinitconst = {
+static DEFINE_PCI_DEVICE_TABLE(pci_ids) = {
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x82B)},
{0}
};
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c
index ba24790..a93adcca 100644
--- a/drivers/misc/tifm_7xx1.c
+++ b/drivers/misc/tifm_7xx1.c
@@ -415,13 +415,10 @@ static void tifm_7xx1_remove(struct pci_dev *dev)
tifm_free_adapter(fm);
}
-static struct pci_device_id tifm_7xx1_pci_tbl [] = {
- { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11_FM, PCI_ANY_ID,
- PCI_ANY_ID, 0, 0, 0 }, /* xx21 - the one I have */
- { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX12_FM, PCI_ANY_ID,
- PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX20_FM, PCI_ANY_ID,
- PCI_ANY_ID, 0, 0, 0 },
+static DEFINE_PCI_DEVICE_TABLE(tifm_7xx1_pci_tbl) = {
+ { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_XX21_XX11_FM) },
+ { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_XX12_FM) },
+ { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_XX20_FM) },
{ }
};
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists