diff mbox

[U-Boot,v2,03/26] dm: pci: Add a dm_ prefix to pci_bus_find_bdf()

Message ID 1448828291-12660-4-git-send-email-sjg@chromium.org
State Accepted
Commit f3f1faefcc25c7cce2babe944aa39178b498cd7f
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Nov. 29, 2015, 8:17 p.m. UTC
Most driver model PCI functions have a dm_ prefix. At some point, when the
old code is converted to driver model and the old functions are removed, we
will drop that prefix.

For consistency, we should use the dm_ prefix for all driver model
functions. Update pci_bus_find_bdf() accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 common/cmd_pci.c         | 2 +-
 drivers/pci/pci-uclass.c | 2 +-
 include/pci.h            | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Bin Meng Dec. 3, 2015, 9:06 a.m. UTC | #1
On Mon, Nov 30, 2015 at 4:17 AM, Simon Glass <sjg@chromium.org> wrote:
> Most driver model PCI functions have a dm_ prefix. At some point, when the
> old code is converted to driver model and the old functions are removed, we
> will drop that prefix.
>
> For consistency, we should use the dm_ prefix for all driver model
> functions. Update pci_bus_find_bdf() accordingly.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass Dec. 14, 2015, 3:45 a.m. UTC | #2
Applied to u-boot-dm/next.
diff mbox

Patch

diff --git a/common/cmd_pci.c b/common/cmd_pci.c
index 4e0951f..8094d33 100644
--- a/common/cmd_pci.c
+++ b/common/cmd_pci.c
@@ -606,7 +606,7 @@  static int do_pci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	}
 
 #ifdef CONFIG_DM_PCI
-	ret = pci_bus_find_bdf(bdf, &dev);
+	ret = dm_pci_bus_find_bdf(bdf, &dev);
 	if (ret) {
 		printf("No such device\n");
 		return CMD_RET_FAILURE;
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index f6ca58b..2828055 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -128,7 +128,7 @@  int pci_bus_find_devfn(struct udevice *bus, pci_dev_t find_devfn,
 	return -ENODEV;
 }
 
-int pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp)
+int dm_pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp)
 {
 	struct udevice *bus;
 	int ret;
diff --git a/include/pci.h b/include/pci.h
index 5d45cdc..5861976 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -902,13 +902,13 @@  int pci_bind_bus_devices(struct udevice *bus);
 int pci_auto_config_devices(struct udevice *bus);
 
 /**
- * pci_bus_find_bdf() - Find a device given its PCI bus address
+ * dm_pci_bus_find_bdf() - Find a device given its PCI bus address
  *
  * @bdf:	PCI device address: bus, device and function -see PCI_BDF()
  * @devp:	Returns the device for this address, if found
  * @return 0 if OK, -ENODEV if not found
  */
-int pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp);
+int dm_pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp);
 
 /**
  * pci_bus_find_devfn() - Find a device on a bus