Skip to content

Commit 7d2ebbc

Browse files
masahir0ybjorn-helgaas
authored andcommitted
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/[email protected] Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 88f2ab3 commit 7d2ebbc

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Documentation/PCI/pciebus-howto.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ driver data structure.
139139

140140
static struct pcie_port_service_driver root_aerdrv = {
141141
.name = (char *)device_name,
142-
.id_table = &service_id[0],
142+
.id_table = service_id,
143143

144144
.probe = aerdrv_load,
145145
.remove = aerdrv_unload,

Documentation/translations/zh_CN/PCI/pciebus-howto.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pcie_port_service_unregister取代了Linux驱动模型的pci_unregister_driver
124124

125125
static struct pcie_port_service_driver root_aerdrv = {
126126
.name = (char *)device_name,
127-
.id_table = &service_id[0],
127+
.id_table = service_id,
128128

129129
.probe = aerdrv_load,
130130
.remove = aerdrv_unload,

drivers/pci/pcie/portdrv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ static const struct pci_error_handlers pcie_portdrv_err_handler = {
786786

787787
static struct pci_driver pcie_portdriver = {
788788
.name = "pcieport",
789-
.id_table = &port_pci_ids[0],
789+
.id_table = port_pci_ids,
790790

791791
.probe = pcie_portdrv_probe,
792792
.remove = pcie_portdrv_remove,

drivers/usb/cdns3/cdnsp-pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static const struct pci_device_id cdnsp_pci_ids[] = {
231231

232232
static struct pci_driver cdnsp_pci_driver = {
233233
.name = "cdnsp-pci",
234-
.id_table = &cdnsp_pci_ids[0],
234+
.id_table = cdnsp_pci_ids,
235235
.probe = cdnsp_pci_probe,
236236
.remove = cdnsp_pci_remove,
237237
.driver = {

drivers/usb/gadget/udc/cdns2/cdns2-pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static const struct pci_device_id cdns2_pci_ids[] = {
121121

122122
static struct pci_driver cdns2_pci_driver = {
123123
.name = "cdns2-pci",
124-
.id_table = &cdns2_pci_ids[0],
124+
.id_table = cdns2_pci_ids,
125125
.probe = cdns2_pci_probe,
126126
.remove = cdns2_pci_remove,
127127
.driver = {

0 commit comments

Comments
 (0)