mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
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. Link: https://lore.kernel.org/r/20240517120458.1260489-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
88f2ab3999
commit
7d2ebbc33d
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user