[PATCH 04/10] PCI: altera: Rename _altera_pcie_cfg_read() to altera_raw_cfg_read()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/pci/host/pcie-altera.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c
index 243e6bc..5362ac1 100644
--- a/drivers/pci/host/pcie-altera.c
+++ b/drivers/pci/host/pcie-altera.c
@@ -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)

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux