MIPS: PCI: Add struct pci_ops member names to initialization
authorRob Herring <robh@kernel.org>
Sat, 10 Jan 2015 02:34:36 +0000 (20:34 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 22 Jan 2015 19:55:31 +0000 (13:55 -0600)
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
arch/mips/pci/pci-bcm1480.c
arch/mips/pci/pci-octeon.c
arch/mips/pci/pcie-octeon.c

index 5ec2a7bae02c80b1d9894e1c77e5cad4f99336a1..f2355e3e65a10c4259015c48d273236630102c2d 100644 (file)
@@ -173,8 +173,8 @@ static int bcm1480_pcibios_write(struct pci_bus *bus, unsigned int devfn,
 }
 
 struct pci_ops bcm1480_pci_ops = {
-       bcm1480_pcibios_read,
-       bcm1480_pcibios_write,
+       .read = bcm1480_pcibios_read,
+       .write = bcm1480_pcibios_write,
 };
 
 static struct resource bcm1480_mem_resource = {
index d07e04121cc6fe7221e5f710abf68b515db24d5a..bedb72bd3a27155fb4068cfb7b9ee69d589f0c22 100644 (file)
@@ -327,8 +327,8 @@ static int octeon_write_config(struct pci_bus *bus, unsigned int devfn,
 
 
 static struct pci_ops octeon_pci_ops = {
-       octeon_read_config,
-       octeon_write_config,
+       .read = octeon_read_config,
+       .write = octeon_write_config,
 };
 
 static struct resource octeon_pci_mem_resource = {
index 5e36c33e5543fbc2c8a3227ab7dbf6b287f8931a..eb4a17ba4a530a9a73702bfb6fd6db1890295bb4 100644 (file)
@@ -1792,8 +1792,8 @@ static int octeon_dummy_write_config(struct pci_bus *bus, unsigned int devfn,
 }
 
 static struct pci_ops octeon_pcie0_ops = {
-       octeon_pcie0_read_config,
-       octeon_pcie0_write_config,
+       .read = octeon_pcie0_read_config,
+       .write = octeon_pcie0_write_config,
 };
 
 static struct resource octeon_pcie0_mem_resource = {
@@ -1813,8 +1813,8 @@ static struct pci_controller octeon_pcie0_controller = {
 };
 
 static struct pci_ops octeon_pcie1_ops = {
-       octeon_pcie1_read_config,
-       octeon_pcie1_write_config,
+       .read = octeon_pcie1_read_config,
+       .write = octeon_pcie1_write_config,
 };
 
 static struct resource octeon_pcie1_mem_resource = {
@@ -1834,8 +1834,8 @@ static struct pci_controller octeon_pcie1_controller = {
 };
 
 static struct pci_ops octeon_dummy_ops = {
-       octeon_dummy_read_config,
-       octeon_dummy_write_config,
+       .read = octeon_dummy_read_config,
+       .write = octeon_dummy_write_config,
 };
 
 static struct resource octeon_dummy_mem_resource = {