From ebac37cfbfb32ea44704fe032fadd5cf334824b7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 29 Feb 2016 15:25:43 -0700 Subject: 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 Reviewed-by: Bin Meng Tested-by: Stephen Warren --- cmd/part.c | 6 +++--- cmd/unzip.c | 2 +- cmd/usb_mass_storage.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cmd') diff --git a/cmd/part.c b/cmd/part.c index a572aab..dd32d50 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -81,7 +81,7 @@ static int do_part_list(int argc, char * const argv[]) return CMD_RET_USAGE; } - ret = get_device(argv[0], argv[1], &desc); + ret = blk_get_device_by_str(argv[0], argv[1], &desc); if (ret < 0) return 1; @@ -128,7 +128,7 @@ static int do_part_start(int argc, char * const argv[]) part = simple_strtoul(argv[2], NULL, 0); - ret = get_device(argv[0], argv[1], &desc); + ret = blk_get_device_by_str(argv[0], argv[1], &desc); if (ret < 0) return 1; @@ -162,7 +162,7 @@ static int do_part_size(int argc, char * const argv[]) part = simple_strtoul(argv[2], NULL, 0); - ret = get_device(argv[0], argv[1], &desc); + ret = blk_get_device_by_str(argv[0], argv[1], &desc); if (ret < 0) return 1; diff --git a/cmd/unzip.c b/cmd/unzip.c index 5be1566..a8bcb1f 100644 --- a/cmd/unzip.c +++ b/cmd/unzip.c @@ -53,7 +53,7 @@ static int do_gzwrite(cmd_tbl_t *cmdtp, int flag, if (argc < 5) return CMD_RET_USAGE; - ret = get_device(argv[1], argv[2], &bdev); + ret = blk_get_device_by_str(argv[1], argv[2], &bdev); if (ret < 0) return CMD_RET_FAILURE; diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c index 03b7e21..59bb4ee 100644 --- a/cmd/usb_mass_storage.c +++ b/cmd/usb_mass_storage.c @@ -69,7 +69,7 @@ static int ums_init(const char *devtype, const char *devnums) if (!devnum) break; - ret = get_device(devtype, devnum, &block_dev); + ret = blk_get_device_by_str(devtype, devnum, &block_dev); if (ret < 0) goto cleanup; -- cgit v1.1