From 4101f6879256720b30df712089a3df18565f9203 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 29 Feb 2016 15:25:34 -0700 Subject: dm: Drop the block_dev_desc_t typedef Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Stephen Warren --- cmd/fat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/fat.c') diff --git a/cmd/fat.c b/cmd/fat.c index aae993d..82b9b38 100644 --- a/cmd/fat.c +++ b/cmd/fat.c @@ -69,7 +69,7 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int dev, part; - block_dev_desc_t *dev_desc; + struct blk_desc *dev_desc; disk_partition_t info; if (argc < 2) { @@ -105,7 +105,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag, int ret; unsigned long addr; unsigned long count; - block_dev_desc_t *dev_desc = NULL; + struct blk_desc *dev_desc = NULL; disk_partition_t info; int dev = 0; int part = 1; -- cgit v1.1 From e35929e4a1ffe861f2f45e107986568c56c4f077 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 29 Feb 2016 15:25:44 -0700 Subject: dm: blk: Rename get_device_and_partition() Rename this function to blk_get_device_part_str(). This is a better name because it makes it clear that the function returns a block device and parses a string. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Stephen Warren --- cmd/fat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/fat.c') diff --git a/cmd/fat.c b/cmd/fat.c index 82b9b38..18a1be9 100644 --- a/cmd/fat.c +++ b/cmd/fat.c @@ -77,7 +77,7 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } - part = get_device_and_partition(argv[1], argv[2], &dev_desc, &info, 1); + part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); if (part < 0) return 1; @@ -114,7 +114,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag, if (argc < 5) return cmd_usage(cmdtp); - part = get_device_and_partition(argv[1], argv[2], &dev_desc, &info, 1); + part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); if (part < 0) return 1; -- cgit v1.1 From bcce53d048de7f41078d25e39aa2f26d752d3658 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 29 Feb 2016 15:25:51 -0700 Subject: dm: block: Rename device number member dev to devnum This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Stephen Warren --- cmd/fat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/fat.c') diff --git a/cmd/fat.c b/cmd/fat.c index 18a1be9..4e20746 100644 --- a/cmd/fat.c +++ b/cmd/fat.c @@ -81,7 +81,7 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, if (part < 0) return 1; - dev = dev_desc->dev; + dev = dev_desc->devnum; if (fat_set_blk_dev(dev_desc, &info) != 0) { printf("\n** Unable to use %s %d:%d for fatinfo **\n", argv[1], dev, part); @@ -118,7 +118,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag, if (part < 0) return 1; - dev = dev_desc->dev; + dev = dev_desc->devnum; if (fat_set_blk_dev(dev_desc, &info) != 0) { printf("\n** Unable to use %s %d:%d for fatwrite **\n", -- cgit v1.1