Patchwork PCI: PCIe portdrv: use DEFINE_PCI_DEVICE_TABLE macro

login
register
mail settings
Submitter Jingoo Han
Date Nov. 28, 2013, 3:12 a.m.
Message ID <002801ceebe7$a0293170$e07b9450$%han@samsung.com>
Download mbox | patch
Permalink /patch/294743/
State Rejected
Headers show

Comments

Jingoo Han - Nov. 28, 2013, 3:12 a.m.
This macro is used to create a struct pci_device_id array.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/pci/pcie/portdrv_pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jingoo Han - Nov. 28, 2013, 4:38 a.m.
On Thursday, November 28, 2013 12:12 PM, Jingoo Han wrote:
> 
> This macro is used to create a struct pci_device_id array.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Please, ignore this patch.
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/pci/pcie/portdrv_pci.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
> index 0d8fdc4..5356902 100644
> --- a/drivers/pci/pcie/portdrv_pci.c
> +++ b/drivers/pci/pcie/portdrv_pci.c
> @@ -368,7 +368,7 @@ static void pcie_portdrv_err_resume(struct pci_dev *dev)
>  /*
>   * LINUX Device Driver Model
>   */
> -static const struct pci_device_id port_pci_ids[] = { {
> +static DEFINE_PCI_DEVICE_TABLE(port_pci_ids) = { {
>  	/* handle any PCI-Express port */
>  	PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0),
>  	}, { /* end: all zeroes */ }
> --
> 1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 0d8fdc4..5356902 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -368,7 +368,7 @@  static void pcie_portdrv_err_resume(struct pci_dev *dev)
 /*
  * LINUX Device Driver Model
  */
-static const struct pci_device_id port_pci_ids[] = { {
+static DEFINE_PCI_DEVICE_TABLE(port_pci_ids) = { {
 	/* handle any PCI-Express port */
 	PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0),
 	}, { /* end: all zeroes */ }