mtd: amd76xrom: use DEFINE_PCI_DEVICE_TABLE macro
Subsystems (2)
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
@@ -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
PATCH 2/9 mtd: ck804xrom: use DEFINE_PCI_DEVICE_TABLE macro
This macro is used to create a struct pci_device_id array.
--- drivers/mtd/maps/ck804xrom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/maps/ck804xrom.c +2 -2
@@ -326,7 +326,7 @@ static void ck804xrom_remove_one(struct pci_dev *pdev)ck804xrom_cleanup (window); } -static struct pci_device_id ck804xrom_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE (ck804xrom_pci_tbl) = { {PCI_DEVICE (PCI_VENDOR_ID_NVIDIA ,0x0051 ), .driver_data =DEV_CK804 }, {PCI_DEVICE (PCI_VENDOR_ID_NVIDIA ,0x0360 ), .driver_data =DEV_MCP55 }, {PCI_DEVICE (PCI_VENDOR_ID_NVIDIA ,0x0361 ), .driver_data =DEV_MCP55 },
@@ -353,7 +353,7 @@ static struct pci_driver ck804xrom_driver = {static int __init init_ck804xrom (void ) {struct pci_dev *pdev; -struct pci_device_id *id; +const struct pci_device_id *id;int retVal; pdev =NULL ;
Signature · 1 line
1.7.10.4
PATCH 3/9 mtd: esb2rom: use DEFINE_PCI_DEVICE_TABLE macro
In reply to Jingoo HanThis macro is used to create a struct pci_device_id array.
--- drivers/mtd/maps/esb2rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/maps/esb2rom.c +2 -2
@@ -384,7 +384,7 @@ static void esb2rom_remove_one(struct pci_dev *pdev)esb2rom_cleanup (window); } -static struct pci_device_id esb2rom_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE (esb2rom_pci_tbl) = { {PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801BA_0 ,PCI_ANY_ID ,PCI_ANY_ID , }, {PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801CA_0 ,
@@ -414,7 +414,7 @@ static struct pci_driver esb2rom_driver = {static int __init init_esb2rom (void ) {struct pci_dev *pdev; -struct pci_device_id *id; +const struct pci_device_id *id;int retVal; pdev =NULL ;
Signature · 1 line
1.7.10.4
PATCH 4/9 mtd: ichxrom: use DEFINE_PCI_DEVICE_TABLE macro
In reply to Jingoo HanThis macro is used to create a struct pci_device_id array.
--- drivers/mtd/maps/ichxrom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/maps/ichxrom.c +2 -2
@@ -321,7 +321,7 @@ static void ichxrom_remove_one(struct pci_dev *pdev)ichxrom_cleanup (window); } -static struct pci_device_id ichxrom_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE (ichxrom_pci_tbl) = { {PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801BA_0 ,PCI_ANY_ID ,PCI_ANY_ID , }, {PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801CA_0 ,
@@ -349,7 +349,7 @@ static struct pci_driver ichxrom_driver = {static int __init init_ichxrom (void ) {struct pci_dev *pdev; -struct pci_device_id *id; +const struct pci_device_id *id; pdev =NULL ;for (id = ichxrom_pci_tbl; id->vendor; id++) {
Signature · 1 line
1.7.10.4
PATCH 5/9 mtd: intel_vr_nor: use DEFINE_PCI_DEVICE_TABLE macro
In reply to Jingoo HanThis macro is used to create a struct pci_device_id array.
--- drivers/mtd/maps/intel_vr_nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/maps/intel_vr_nor.c +1 -1
@@ -171,7 +171,7 @@ static int vr_nor_init_maps(struct vr_nor_mtd *p)return err; } -static struct pci_device_id vr_nor_pci_ids[] = { +static DEFINE_PCI_DEVICE_TABLE (vr_nor_pci_ids) = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x500D )}, {0 ,} };
Signature · 1 line
1.7.10.4
PATCH 6/9 mtd: pci: use DEFINE_PCI_DEVICE_TABLE macro
In reply to Jingoo HanThis macro is used to create a struct pci_device_id array.
--- drivers/mtd/maps/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/maps/pci.c +1 -1
@@ -229,7 +229,7 @@ static struct mtd_pci_info intel_dc21285_info = {* PCI device ID table */ -static struct pci_device_id mtd_pci_ids[] = { +static DEFINE_PCI_DEVICE_TABLE (mtd_pci_ids) = { { .vendor =PCI_VENDOR_ID_INTEL , .device =0x530d ,
Signature · 1 line
1.7.10.4
PATCH 7/9 mtd: scb2_flash: use DEFINE_PCI_DEVICE_TABLE macro
In reply to Jingoo HanThis macro is used to create a struct pci_device_id array.
--- drivers/mtd/maps/scb2_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/maps/scb2_flash.c +1 -1
@@ -214,7 +214,7 @@ static void scb2_flash_remove(struct pci_dev *dev)release_mem_region (SCB2_ADDR ,SCB2_WINDOW ); } -static struct pci_device_id scb2_flash_pci_ids[] = { +static DEFINE_PCI_DEVICE_TABLE (scb2_flash_pci_ids) = { { .vendor =PCI_VENDOR_ID_SERVERWORKS , .device =PCI_DEVICE_ID_SERVERWORKS_CSB5 ,
Signature · 1 line
1.7.10.4
PATCH 8/9 mtd: cafe_nand: use DEFINE_PCI_DEVICE_TABLE macro
In reply to Jingoo HanThis macro is used to create a struct pci_device_id array.
--- drivers/mtd/nand/cafe_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/cafe_nand.c +1 -1
@@ -830,7 +830,7 @@ static void cafe_nand_remove(struct pci_dev *pdev)kfree (mtd); } -static const struct pci_device_id cafe_nand_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE (cafe_nand_tbl) = { {PCI_VENDOR_ID_MARVELL ,PCI_DEVICE_ID_MARVELL_88ALP01_NAND ,PCI_ANY_ID ,PCI_ANY_ID }, { }
Signature · 1 line
1.7.10.4
PATCH 9/9 mtd: r852: use DEFINE_PCI_DEVICE_TABLE macro
In reply to Jingoo HanThis macro is used to create a struct pci_device_id array.
--- drivers/mtd/nand/r852.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/r852.c +1 -1
@@ -1057,7 +1057,7 @@ static int r852_resume(struct device *device) }#endif -static const struct pci_device_id r852_pci_id_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE (r852_pci_id_tbl) = { {PCI_VDEVICE (RICOH ,0x0852 ), }, { },
Signature · 1 line
1.7.10.4
Quoted 9 lines
-----Original Message-----
From: Jingoo Han [mailto:[email protected]]
Sent: Thursday, November 28, 2013 11:32 AM
To: 'Brian Norris'
Cc: 'Artem Bityutskiy'; 'David Woodhouse'; [email protected]; 'Jingoo Han'
Subject: [PATCH 1/9] mtd: amd76xrom: useDEFINE_PCI_DEVICE_TABLEmacro
Quoted 3 lines
This macro is used to create a struct
pci_device_idarray.Signed-off-by Jingoo Han <[email protected]>
Please, ignore these patches.
According to the Greg Kroah-Hartman,
"Yeah, and it's a horrid macro that deserves to be removed, please don't use it in more places.
Actually, if you could just remove it, that would be best, sorry, I'm not going to take these patches."
So, I will send the patch to remove 'DEFINE_PCI_DEVICE_TABLE' instead. Sorry for annoying. :-)
Best regards,
Jingoo Han
Quoted 28 lines
--- drivers/mtd/maps/amd76xrom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mtd/maps/amd76xrom.c +2
-3@@ -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 ); --1.7.10.4