summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-29 15:25:42 -0700
committerSimon Glass <sjg@chromium.org>2016-03-14 15:34:50 -0600
commitdb1d9e78e6f0ea51a698f18abe4cebc5ff39b691 (patch)
tree087b7d1acfd52d416a6a596a8e24f5972be251a6 /api
parentfb1b7be9538dab7ce69208045cc3b80c6eb57f3b (diff)
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>
Diffstat (limited to 'api')
-rw-r--r--api/api_storage.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/api/api_storage.c b/api/api_storage.c
index 225a6cf10f..8c30c56e49 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -106,7 +106,7 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
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 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
} 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 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
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 @@ static int dev_stor_type(struct blk_desc *dd)
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 @@ static int dev_stor_is_valid(int type, struct blk_desc *dd)
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;