Skip to contentSkip to conversation

mtd: amd76xrom: use DEFINE_PCI_DEVICE_TABLE macro

PATCH In review Jingoo Han 1 participant 2 messages Nov 28, 2013 Memory technology devices (MTD)

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/9 mtd: amd76xrom: use DEFINE_PCI_DEVICE_TABLE macro

This macro is used to create a struct pci_device_id array.

---
 drivers/mtd/maps/amd76xrom.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/maps/amd76xrom.c +2 -2
index f7207b0..6a0582e 100644
@@ -296,7 +296,7 @@ static void amd76xrom_remove_one(struct pci_dev *pdev)
 	amd76xrom_cleanup(window);
 }
 
-static struct pci_device_id amd76xrom_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(amd76xrom_pci_tbl) = {
 	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410,
 		PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7440,
@@ -319,7 +319,7 @@ static struct pci_driver amd76xrom_driver = {
 static int __init init_amd76xrom(void)
 {
 	struct pci_dev *pdev;
-	struct pci_device_id *id;
+	const struct pci_device_id *id;
 	pdev = NULL;
 	for(id = amd76xrom_pci_tbl; id->vendor; id++) {
 		pdev = pci_get_device(id->vendor, id->device, NULL);
Signature · 1 line
1.7.10.4
author
#1 lore raw
Quoted 3 lines · Jingoo Han

This macro is used to create a struct pci_device_id array.

Oops,
Please ignore this patch.
I was confused, so I sent the patch to wrong cc-list. Sorry.

Best regards,
Jingoo Han

Quoted 4 lines
---
 drivers/mtd/maps/amd76xrom.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)