Skip to content

Commit ab1d7f9

Browse files
robherringbjorn-helgaas
authored andcommitted
MIPS: PCI: Add struct pci_ops member names to initialization
Some instances of pci_ops initialization rely on the read/write members' location in the struct. This is fragile and may break when adding new members to the beginning of the struct. No functional change. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Ralf Baechle <ralf@linux-mips.org> CC: linux-mips@linux-mips.org
1 parent 6f918ce commit ab1d7f9

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

arch/mips/pci/pci-bcm1480.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ static int bcm1480_pcibios_write(struct pci_bus *bus, unsigned int devfn,
173173
}
174174

175175
struct pci_ops bcm1480_pci_ops = {
176-
bcm1480_pcibios_read,
177-
bcm1480_pcibios_write,
176+
.read = bcm1480_pcibios_read,
177+
.write = bcm1480_pcibios_write,
178178
};
179179

180180
static struct resource bcm1480_mem_resource = {

arch/mips/pci/pci-octeon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ static int octeon_write_config(struct pci_bus *bus, unsigned int devfn,
327327

328328

329329
static struct pci_ops octeon_pci_ops = {
330-
octeon_read_config,
331-
octeon_write_config,
330+
.read = octeon_read_config,
331+
.write = octeon_write_config,
332332
};
333333

334334
static struct resource octeon_pci_mem_resource = {

arch/mips/pci/pcie-octeon.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,8 +1792,8 @@ static int octeon_dummy_write_config(struct pci_bus *bus, unsigned int devfn,
17921792
}
17931793

17941794
static struct pci_ops octeon_pcie0_ops = {
1795-
octeon_pcie0_read_config,
1796-
octeon_pcie0_write_config,
1795+
.read = octeon_pcie0_read_config,
1796+
.write = octeon_pcie0_write_config,
17971797
};
17981798

17991799
static struct resource octeon_pcie0_mem_resource = {
@@ -1813,8 +1813,8 @@ static struct pci_controller octeon_pcie0_controller = {
18131813
};
18141814

18151815
static struct pci_ops octeon_pcie1_ops = {
1816-
octeon_pcie1_read_config,
1817-
octeon_pcie1_write_config,
1816+
.read = octeon_pcie1_read_config,
1817+
.write = octeon_pcie1_write_config,
18181818
};
18191819

18201820
static struct resource octeon_pcie1_mem_resource = {
@@ -1834,8 +1834,8 @@ static struct pci_controller octeon_pcie1_controller = {
18341834
};
18351835

18361836
static struct pci_ops octeon_dummy_ops = {
1837-
octeon_dummy_read_config,
1838-
octeon_dummy_write_config,
1837+
.read = octeon_dummy_read_config,
1838+
.write = octeon_dummy_write_config,
18391839
};
18401840

18411841
static struct resource octeon_dummy_mem_resource = {

0 commit comments

Comments
 (0)