Skip to contentSkip to conversation

PCI: PCIe portdrv: use DEFINE_PCI_DEVICE_TABLE macro

PATCH In review Jingoo Han 1 participant 2 messages Nov 28, 2013 PCI

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 PCI: PCIe portdrv: use DEFINE_PCI_DEVICE_TABLE macro

This macro is used to create a struct pci_device_id array.

---
 drivers/pci/pcie/portdrv_pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/portdrv_pci.c +1 -1
index 0d8fdc4..5356902 100644
@@ -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 */ }
Signature · 1 line
1.7.10.4
author
#1 lore raw
Quoted 4 lines · Jingoo Han

This macro is used to create a struct pci_device_id array.

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

Quoted 19 lines
---
 drivers/pci/pcie/portdrv_pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/portdrv_pci.c +1 -2
index 0d8fdc4..5356902 100644
@@ -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