diff mbox

[1/9] mtd: amd76xrom: use DEFINE_PCI_DEVICE_TABLE macro

Message ID 001e01ceebe1$f5adf370$e109da50$%han@samsung.com
State New, archived
Headers show

Commit Message

Jingoo Han Nov. 28, 2013, 2:31 a.m. UTC
This macro is used to create a struct pci_device_id array.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/maps/amd76xrom.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jingoo Han Nov. 28, 2013, 4:36 a.m. UTC | #1
> -----Original Message-----
> From: Jingoo Han [mailto:jg1.han@samsung.com]
> Sent: Thursday, November 28, 2013 11:32 AM
> To: 'Brian Norris'
> Cc: 'Artem Bityutskiy'; 'David Woodhouse'; linux-mtd@lists.infradead.org; 'Jingoo Han'
> Subject: [PATCH 1/9] mtd: amd76xrom: use DEFINE_PCI_DEVICE_TABLE macro
> 
> This macro is used to create a struct pci_device_id array.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

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

> ---
>  drivers/mtd/maps/amd76xrom.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
> index f7207b0..6a0582e 100644
> --- a/drivers/mtd/maps/amd76xrom.c
> +++ b/drivers/mtd/maps/amd76xrom.c
> @@ -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
diff mbox

Patch

diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
index f7207b0..6a0582e 100644
--- a/drivers/mtd/maps/amd76xrom.c
+++ b/drivers/mtd/maps/amd76xrom.c
@@ -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);