public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jiri Slaby <jirislaby@gmail.com>, Alex Dubov <oakad@yahoo.com>,
	David Altobelli <david.altobelli@hp.com>,
	Brent Casavant <bcasavan@sgi.com>,
	J Freyensee <james_p_freyensee@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <greg@kroah.com>
Subject: [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE
Date: Fri, 02 Dec 2011 11:02:57 +0800	[thread overview]
Message-ID: <1322794977.25851.1.camel@phoenix> (raw)

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@arndb.de>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Cc: David Altobelli <david.altobelli@hp.com>
Cc: Brent Casavant <bcasavan@sgi.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Axel Lin <axel.lin@gmail.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




             reply	other threads:[~2011-12-02  3:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02  3:02 Axel Lin [this message]
2011-12-02 15:42 ` [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE Brent Casavant
2011-12-02 15:50 ` Altobelli, David
2011-12-02 16:03 ` Greg KH
2011-12-02 21:01   ` Joe Perches
2011-12-03  1:04   ` Axel Lin
2011-12-03  1:11     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322794977.25851.1.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=arnd@arndb.de \
    --cc=bcasavan@sgi.com \
    --cc=david.altobelli@hp.com \
    --cc=greg@kroah.com \
    --cc=james_p_freyensee@linux.intel.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oakad@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox