Skip to contentSkip to conversation

spi: Convert to DEFINE_PCI_DEVICE_TABLE

PATCH Applied Axel Lin 2 participants 2 messages Dec 15, 2011 – Mar 9, 2012

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: Convert to DEFINE_PCI_DEVICE_TABLE

Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE tables.

---
 drivers/spi/spi-dw-pci.c       |    2 +-
 drivers/spi/spi-pxa2xx-pci.c   |    2 +-
 drivers/spi/spi-topcliff-pch.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/spi/spi-dw-pci.c +1 -1
index f64250e..14f7cc9 100644
@@ -149,7 +149,7 @@ static int spi_resume(struct pci_dev *pdev)
 #define spi_resume	NULL
 #endif
 
-static const struct pci_device_id pci_ids[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(pci_ids) = {
 	/* Intel MID platform SPI controller 0 */
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0800) },
 	{},
drivers/spi/spi-pxa2xx-pci.c +1 -1
index 8caa07d..3fb44af 100644
@@ -151,7 +151,7 @@ static void __devexit ce4100_spi_remove(struct pci_dev *dev)
 	kfree(spi_info);
 }
 
-static struct pci_device_id ce4100_spi_devices[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(ce4100_spi_devices) = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2e6a) },
 	{ },
 };
drivers/spi/spi-topcliff-pch.c +1 -1
index 99ec279..17274a5 100644
@@ -214,7 +214,7 @@ struct pch_pd_dev_save {
 	struct pch_spi_board_data *board_dat;
 };
 
-static struct pci_device_id pch_spi_pcidev_id[] = {
+static DEFINE_PCI_DEVICE_TABLE(pch_spi_pcidev_id) = {
 	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_GE_SPI),    1, },
 	{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_SPI), 2, },
 	{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_SPI), 1, },
Signature · 11 lines
1.7.5.4




------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
Applied
#1 lore raw
Quoted 4 lines · Axel Lin

Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE tables.

Applied, thanks.

g.

Quoted 50 lines
---
 drivers/spi/spi-dw-pci.c       |    2 +-
 drivers/spi/spi-pxa2xx-pci.c   |    2 +-
 drivers/spi/spi-topcliff-pch.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/spi/spi-dw-pci.c +1 -1
index f64250e..14f7cc9 100644
@@ -149,7 +149,7 @@ static int spi_resume(struct pci_dev *pdev)
 #define spi_resume	NULL
 #endif
 
-static const struct pci_device_id pci_ids[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(pci_ids) = {
 	/* Intel MID platform SPI controller 0 */
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0800) },
 	{},
drivers/spi/spi-pxa2xx-pci.c +1 -1
index 8caa07d..3fb44af 100644
@@ -151,7 +151,7 @@ static void __devexit ce4100_spi_remove(struct pci_dev *dev)
 	kfree(spi_info);
 }
 
-static struct pci_device_id ce4100_spi_devices[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(ce4100_spi_devices) = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2e6a) },
 	{ },
 };
drivers/spi/spi-topcliff-pch.c +1 -1
index 99ec279..17274a5 100644
@@ -214,7 +214,7 @@ struct pch_pd_dev_save {
 	struct pch_spi_board_data *board_dat;
 };
 
-static struct pci_device_id pch_spi_pcidev_id[] = {
+static DEFINE_PCI_DEVICE_TABLE(pch_spi_pcidev_id) = {
 	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_GE_SPI),    1, },
 	{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_SPI), 2, },
 	{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_SPI), 1, },
Signature · 1 line
1.7.5.4
Signature · 8 lines
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/