@@ -261,9 +261,9 @@ static int tlp_cfg_dword_write(struct altera_pcie *altera, u8 bus, u32 devfn,
return PCIBIOS_SUCCESSFUL;
}
-static int _altera_pcie_cfg_read(struct altera_pcie *altera, u8 busno,
- unsigned int devfn, int where, int size,
- u32 *value)
+static int altera_raw_cfg_read(struct altera_pcie *altera, u8 busno,
+ unsigned int devfn, int where, int size,
+ u32 *value)
{
int ret;
u32 data;
@@ -301,9 +301,9 @@ static int _altera_pcie_cfg_read(struct altera_pcie *altera, u8 busno,
return PCIBIOS_SUCCESSFUL;
}
-static int _altera_pcie_cfg_write(struct altera_pcie *altera, u8 busno,
- unsigned int devfn, int where, int size,
- u32 value)
+static int altera_raw_cfg_write(struct altera_pcie *altera, u8 busno,
+ unsigned int devfn, int where, int size,
+ u32 value)
{
u32 data32;
u32 shift = 8 * (where & 3);
@@ -341,8 +341,8 @@ static int altera_pcie_cfg_read(struct pci_bus *bus, unsigned int devfn,
return PCIBIOS_DEVICE_NOT_FOUND;
}
- return _altera_pcie_cfg_read(altera, bus->number, devfn, where, size,
- value);
+ return altera_raw_cfg_read(altera, bus->number, devfn, where, size,
+ value);
}
static int altera_pcie_cfg_write(struct pci_bus *bus, unsigned int devfn,
@@ -356,8 +356,8 @@ static int altera_pcie_cfg_write(struct pci_bus *bus, unsigned int devfn,
if (!altera_pcie_valid_config(altera, bus, PCI_SLOT(devfn)))
return PCIBIOS_DEVICE_NOT_FOUND;
- return _altera_pcie_cfg_write(altera, bus->number, devfn, where, size,
- value);
+ return altera_raw_cfg_write(altera, bus->number, devfn, where, size,
+ value);
}
static struct pci_ops altera_pcie_ops = {
@@ -371,9 +371,9 @@ static int altera_read_cap_word(struct altera_pcie *altera, u8 busno,
u32 data;
int ret;
- ret = _altera_pcie_cfg_read(altera, busno, devfn,
- PCIE_CAP_OFFSET + offset, sizeof(*value),
- &data);
+ ret = altera_raw_cfg_read(altera, busno, devfn,
+ PCIE_CAP_OFFSET + offset, sizeof(*value),
+ &data);
*value = data;
return ret;
}
@@ -381,9 +381,9 @@ static int altera_read_cap_word(struct altera_pcie *altera, u8 busno,
static int altera_write_cap_word(struct altera_pcie *altera, u8 busno,
unsigned int devfn, int offset, u16 value)
{
- return _altera_pcie_cfg_write(altera, busno, devfn,
- PCIE_CAP_OFFSET + offset, sizeof(value),
- value);
+ return altera_raw_cfg_write(altera, busno, devfn,
+ PCIE_CAP_OFFSET + offset, sizeof(value),
+ value);
}
static void altera_wait_link_retrain(struct altera_pcie *altera)
Rename _altera_pcie_cfg_read() and _altera_pcie_cfg_write() to altera_raw_cfg_read() and altera_raw_cfg_write() to convey a little more information than an underline does. The difference is that altera_pcie_cfg_read() requires a pointer to a struct pci_bus, while altera_raw_cfg_read() needs only a pointer to a struct altera_pcie, so it can be used before enumerating the bus. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> --- drivers/pci/host/pcie-altera.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html