summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-29 22:25:51 (GMT)
committerSimon Glass <sjg@chromium.org>2016-03-14 21:34:50 (GMT)
commitbcce53d048de7f41078d25e39aa2f26d752d3658 (patch)
tree5eb88ab671c7ec923cfb4fe9c0d3dc4715adb93d /common
parent782b97805e9f59cc2b4d3aa67a8a03248e8cd722 (diff)
downloadu-boot-fsl-qoriq-bcce53d048de7f41078d25e39aa2f26d752d3658.tar.xz
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'common')
-rw-r--r--common/env_fat.c4
-rw-r--r--common/fb_mmc.c4
-rw-r--r--common/usb_storage.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/common/env_fat.c b/common/env_fat.c
index 2f22710..75616d4 100644
--- a/common/env_fat.c
+++ b/common/env_fat.c
@@ -54,7 +54,7 @@ int saveenv(void)
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 saveenv **\n",
FAT_ENV_INTERFACE, dev, part);
@@ -88,7 +88,7 @@ void env_relocate_spec(void)
if (part < 0)
goto err_env_relocate;
- 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 loading the env **\n",
FAT_ENV_INTERFACE, dev, part);
diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index d5c9135..da7949f 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -86,7 +86,7 @@ static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t *info,
blks = dev_desc->block_write(dev_desc, info->start, blkcnt, buffer);
if (blks != blkcnt) {
- error("failed writing to device %d\n", dev_desc->dev);
+ error("failed writing to device %d\n", dev_desc->devnum);
fastboot_fail(response_str, "failed writing to device");
return;
}
@@ -207,7 +207,7 @@ void fb_mmc_erase(const char *cmd, char *response)
blks = dev_desc->block_erase(dev_desc, blks_start, blks_size);
if (blks != blks_size) {
- error("failed erasing from device %d", dev_desc->dev);
+ error("failed erasing from device %d", dev_desc->devnum);
fastboot_fail(response_str, "failed erasing from device");
return;
}
diff --git a/common/usb_storage.c b/common/usb_storage.c
index e105a95..60531e2 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -192,7 +192,7 @@ static int usb_stor_probe_device(struct usb_device *dev)
blkdev = &usb_dev_desc[usb_max_devs];
memset(blkdev, '\0', sizeof(struct blk_desc));
blkdev->if_type = IF_TYPE_USB;
- blkdev->dev = usb_max_devs;
+ blkdev->devnum = usb_max_devs;
blkdev->part_type = PART_TYPE_UNKNOWN;
blkdev->target = 0xff;
blkdev->type = DEV_TYPE_UNKNOWN;
@@ -1029,7 +1029,7 @@ static void usb_bin_fixup(struct usb_device_descriptor descriptor,
static unsigned long usb_stor_read(struct blk_desc *block_dev, lbaint_t blknr,
lbaint_t blkcnt, void *buffer)
{
- int device = block_dev->dev;
+ int device = block_dev->devnum;
lbaint_t start, blks;
uintptr_t buf_addr;
unsigned short smallblks;
@@ -1100,7 +1100,7 @@ retry_it:
static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr,
lbaint_t blkcnt, const void *buffer)
{
- int device = block_dev->dev;
+ int device = block_dev->devnum;
lbaint_t start, blks;
uintptr_t buf_addr;
unsigned short smallblks;