diff options
author | Simon Glass <sjg@chromium.org> | 2016-03-01 01:25:43 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-15 00:34:50 +0300 |
commit | ebac37cfbfb32ea44704fe032fadd5cf334824b7 (patch) | |
tree | fbe5d116a518343935942c1099e018d155b74427 /disk/part.c | |
parent | db1d9e78e6f0ea51a698f18abe4cebc5ff39b691 (diff) | |
download | u-boot-ebac37cfbfb32ea44704fe032fadd5cf334824b7.tar.xz |
dm: blk: Rename get_device() to blk_get_device_by_str()
The current name is too generic. The function returns a block device based
on a provided string. Rename it to aid searching and make its purpose
clearer. Also add a few comments.
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 'disk/part.c')
-rw-r--r-- | disk/part.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/disk/part.c b/disk/part.c index 2466c3ea96..2e7adbcd9d 100644 --- a/disk/part.c +++ b/disk/part.c @@ -449,8 +449,8 @@ int get_partition_info(struct blk_desc *dev_desc, int part, return -1; } -int get_device(const char *ifname, const char *dev_hwpart_str, - struct blk_desc **dev_desc) +int blk_get_device_by_str(const char *ifname, const char *dev_hwpart_str, + struct blk_desc **dev_desc) { char *ep; char *dup_str = NULL; @@ -598,7 +598,7 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str, } /* Look up the device */ - dev = get_device(ifname, dev_str, dev_desc); + dev = blk_get_device_by_str(ifname, dev_str, dev_desc); if (dev < 0) goto cleanup; |