PCI: use array for .id_table consistently
Subsystems (6)
PATCH 1/1 PCI: use array for .id_table consistently
While 'x' and '&x[0]' are equivalent, most of the PCI drivers use the former form for the .id_table.
Update some drivers and documentation for consistency.
Signed-off-by Masahiro Yamada <[email protected]>
---
Documentation/PCI/pciebus-howto.rst | 2 +- Documentation/translations/zh_CN/PCI/pciebus-howto.rst | 2 +- drivers/pci/pcie/portdrv.c | 2 +- drivers/usb/cdns3/cdnsp-pci.c | 2 +- drivers/usb/gadget/udc/cdns2/cdns2-pci.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
Documentation/PCI/pciebus-howto.rst +1 -1
@@ -139,7 +139,7 @@ driver data structure. static struct pcie_port_service_driver root_aerdrv = { .name = (char *)device_name, - .id_table = &service_id[0], + .id_table = service_id, .probe = aerdrv_load, .remove = aerdrv_unload,
Documentation/translations/zh_CN/PCI/pciebus-howto.rst +1 -1
@@ -124,7 +124,7 @@ pcie_port_service_unregister取代了Linux驱动模型的pci_unregister_driver static struct pcie_port_service_driver root_aerdrv = { .name = (char *)device_name, - .id_table = &service_id[0], + .id_table = service_id, .probe = aerdrv_load, .remove = aerdrv_unload,
drivers/pci/pcie/portdrv.c +1 -1
@@ -786,7 +786,7 @@ static const struct pci_error_handlers pcie_portdrv_err_handler = {static struct pci_driver pcie_portdriver = { .name ="pcieport" , - .id_table = &port_pci_ids[0 ], + .id_table = port_pci_ids, .probe = pcie_portdrv_probe, .remove = pcie_portdrv_remove,
drivers/usb/cdns3/cdnsp-pci.c +1 -1
@@ -231,7 +231,7 @@ static const struct pci_device_id cdnsp_pci_ids[] = {static struct pci_driver cdnsp_pci_driver = { .name ="cdnsp-pci" , - .id_table = &cdnsp_pci_ids[0 ], + .id_table = cdnsp_pci_ids, .probe = cdnsp_pci_probe, .remove = cdnsp_pci_remove, .driver = {
drivers/usb/gadget/udc/cdns2/cdns2-pci.c +1 -1
@@ -121,7 +121,7 @@ static const struct pci_device_id cdns2_pci_ids[] = {static struct pci_driver cdns2_pci_driver = { .name ="cdns2-pci" , - .id_table = &cdns2_pci_ids[0 ], + .id_table = cdns2_pci_ids, .probe = cdns2_pci_probe, .remove = cdns2_pci_remove, .driver = {
Signature · 1 line
2.40.1
Bjorn Helgaas
AppliedQuoted 6 lines · Masahiro Yamada
While 'x' and '&x[0]' are equivalent, most of the PCI drivers use the former form for the .id_table.
Update some drivers and documentation for consistency.
Signed-off-by Masahiro Yamada <[email protected]>
Applied to pci/misc for v6.11, thanks!
USB folks, let me know if you'd rather that I drop your parts.
Quoted 77 lines
---
Documentation/PCI/pciebus-howto.rst | 2 +- Documentation/translations/zh_CN/PCI/pciebus-howto.rst | 2 +- drivers/pci/pcie/portdrv.c | 2 +- drivers/usb/cdns3/cdnsp-pci.c | 2 +- drivers/usb/gadget/udc/cdns2/cdns2-pci.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)Documentation/PCI/pciebus-howto.rst +1
-1@@ -139,7 +139,7 @@ driver data structure. static struct pcie_port_service_driver root_aerdrv = { .name = (char *)device_name, - .id_table = &service_id[0], + .id_table = service_id, .probe = aerdrv_load, .remove = aerdrv_unload,Documentation/translations/zh_CN/PCI/pciebus-howto.rst +1
-1@@ -124,7 +124,7 @@ pcie_port_service_unregister取代了Linux驱动模型的pci_unregister_driver static struct pcie_port_service_driver root_aerdrv = { .name = (char *)device_name, - .id_table = &service_id[0], + .id_table = service_id, .probe = aerdrv_load, .remove = aerdrv_unload,drivers/pci/pcie/portdrv.c +1
-1@@ -786,7 +786,7 @@ static const struct pci_error_handlers pcie_portdrv_err_handler = {static struct pci_driver pcie_portdriver = { .name ="pcieport" , - .id_table = &port_pci_ids[0 ], + .id_table = port_pci_ids, .probe = pcie_portdrv_probe, .remove = pcie_portdrv_remove,drivers/usb/cdns3/cdnsp-pci.c +1
-1@@ -231,7 +231,7 @@ static const struct pci_device_id cdnsp_pci_ids[] = {static struct pci_driver cdnsp_pci_driver = { .name ="cdnsp-pci" , - .id_table = &cdnsp_pci_ids[0 ], + .id_table = cdnsp_pci_ids, .probe = cdnsp_pci_probe, .remove = cdnsp_pci_remove, .driver = {drivers/usb/gadget/udc/cdns2/cdns2-pci.c +1
-1@@ -121,7 +121,7 @@ static const struct pci_device_id cdns2_pci_ids[] = {static struct pci_driver cdns2_pci_driver = { .name ="cdns2-pci" , - .id_table = &cdns2_pci_ids[0 ], + .id_table = cdns2_pci_ids, .probe = cdns2_pci_probe, .remove = cdns2_pci_remove, .driver = {Signature · 1 line
2.40.1