dm: blk: Rename get_dev() to blk_get_dev()

The current name is too generic. Add a 'blk_' prefix to aid searching and
make its purpose clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
diff --git a/api/api_storage.c b/api/api_storage.c
index 225a6cf..8c30c56 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -106,7 +106,7 @@
 	struct blk_desc *dd;
 
 	if (first) {
-		di->cookie = (void *)get_dev(specs[type].name, 0);
+		di->cookie = (void *)blk_get_dev(specs[type].name, 0);
 		if (di->cookie == NULL)
 			return 0;
 		else
@@ -119,7 +119,8 @@
 
 	} else {
 		for (i = 0; i < specs[type].max_dev; i++)
-			if (di->cookie == (void *)get_dev(specs[type].name, i)) {
+			if (di->cookie ==
+			    (void *)blk_get_dev(specs[type].name, i)) {
 				/* previous cookie found -- advance to the
 				 * next device, if possible */
 
@@ -129,7 +130,8 @@
 					break;
 				}
 
-				di->cookie = (void *)get_dev(specs[type].name, i);
+				di->cookie = (void *)blk_get_dev(
+							specs[type].name, i);
 				if (di->cookie == NULL)
 					return 0;
 				else
@@ -174,7 +176,7 @@
 
 	for (i = ENUM_IDE; i < ENUM_MAX; i++)
 		for (j = 0; j < specs[i].max_dev; j++)
-			if (dd == get_dev(specs[i].name, j))
+			if (dd == blk_get_dev(specs[i].name, j))
 				return i;
 
 	return ENUM_MAX;
@@ -313,7 +315,7 @@
 	int i;
 
 	for (i = 0; i < specs[type].max_dev; i++)
-		if (dd == get_dev(specs[type].name, i))
+		if (dd == blk_get_dev(specs[type].name, i))
 			if (dd->type != DEV_TYPE_UNKNOWN)
 				return 1;
 
diff --git a/cmd/gpt.c b/cmd/gpt.c
index 881367c..8ffaef3 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -418,7 +418,7 @@
 		printf("'%s' is not a number\n", argv[3]);
 		return CMD_RET_USAGE;
 	}
-	blk_dev_desc = get_dev(argv[2], dev);
+	blk_dev_desc = blk_get_dev(argv[2], dev);
 	if (!blk_dev_desc) {
 		printf("%s: %s dev %d NOT available\n",
 		       __func__, argv[2], dev);
diff --git a/cmd/read.c b/cmd/read.c
index 6a1e1d9..12ac165 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -39,7 +39,7 @@
 		part = (int)simple_strtoul(++ep, NULL, 16);
 	}
 
-	dev_desc = get_dev(argv[1], dev);
+	dev_desc = blk_get_dev(argv[1], dev);
 	if (dev_desc == NULL) {
 		printf("Block device %s %d not supported\n", argv[1], dev);
 		return 1;
diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index fd43085..4324f58 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -106,7 +106,7 @@
 	/* initialize the response buffer */
 	response_str = response;
 
-	dev_desc = get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
+	dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
 	if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) {
 		error("invalid mmc device\n");
 		fastboot_fail(response_str, "invalid mmc device");
@@ -179,7 +179,7 @@
 	/* initialize the response buffer */
 	response_str = response;
 
-	dev_desc = get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
+	dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
 	if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) {
 		error("invalid mmc device");
 		fastboot_fail(response_str, "invalid mmc device");
diff --git a/disk/part.c b/disk/part.c
index 7f98d89..2466c3e 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -101,7 +101,7 @@
 	return NULL;
 }
 
-struct blk_desc *get_dev(const char *ifname, int dev)
+struct blk_desc *blk_get_dev(const char *ifname, int dev)
 {
 	return get_dev_hwpart(ifname, dev, 0);
 }
@@ -111,7 +111,7 @@
 	return NULL;
 }
 
-struct blk_desc *get_dev(const char *ifname, int dev)
+struct blk_desc *blk_get_dev(const char *ifname, int dev)
 {
 	return NULL;
 }
diff --git a/include/part.h b/include/part.h
index 4e70d8d..ddc4422 100644
--- a/include/part.h
+++ b/include/part.h
@@ -54,7 +54,7 @@
 /* Misc _get_dev functions */
 #ifdef CONFIG_PARTITIONS
 /**
- * get_dev() - get a pointer to a block device given its type and number
+ * blk_get_dev() - get a pointer to a block device given its type and number
  *
  * Each interface allocates its own devices and typically struct blk_desc is
  * contained with the interface's data structure. There is no global
@@ -66,7 +66,7 @@
  * @return pointer to the block device, or NULL if not available, or an
  *	   error occurred.
  */
-struct blk_desc *get_dev(const char *ifname, int dev);
+struct blk_desc *blk_get_dev(const char *ifname, int dev);
 struct blk_desc *ide_get_dev(int dev);
 struct blk_desc *sata_get_dev(int dev);
 struct blk_desc *scsi_get_dev(int dev);
@@ -107,7 +107,7 @@
 			     struct blk_desc **dev_desc,
 			     disk_partition_t *info, int allow_whole_dev);
 #else
-static inline struct blk_desc *get_dev(const char *ifname, int dev)
+static inline struct blk_desc *blk_get_dev(const char *ifname, int dev)
 { return NULL; }
 static inline struct blk_desc *ide_get_dev(int dev) { return NULL; }
 static inline struct blk_desc *sata_get_dev(int dev) { return NULL; }