summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-29 15:25:51 -0700
committerSimon Glass <sjg@chromium.org>2016-03-14 15:34:50 -0600
commitbcce53d048de7f41078d25e39aa2f26d752d3658 (patch)
tree5eb88ab671c7ec923cfb4fe9c0d3dc4715adb93d /drivers/block
parent782b97805e9f59cc2b4d3aa67a8a03248e8cd722 (diff)
downloadu-boot-imx-bcce53d048de7f41078d25e39aa2f26d752d3658.zip
u-boot-imx-bcce53d048de7f41078d25e39aa2f26d752d3658.tar.gz
u-boot-imx-bcce53d048de7f41078d25e39aa2f26d752d3658.tar.bz2
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 'drivers/block')
-rw-r--r--drivers/block/sandbox.c6
-rw-r--r--drivers/block/systemace.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c
index 093e133..14d3e38 100644
--- a/drivers/block/sandbox.c
+++ b/drivers/block/sandbox.c
@@ -26,7 +26,7 @@ static unsigned long host_block_read(struct blk_desc *block_dev,
unsigned long start, lbaint_t blkcnt,
void *buffer)
{
- int dev = block_dev->dev;
+ int dev = block_dev->devnum;
struct host_block_dev *host_dev = find_host_device(dev);
if (!host_dev)
@@ -48,7 +48,7 @@ static unsigned long host_block_write(struct blk_desc *block_dev,
unsigned long start, lbaint_t blkcnt,
const void *buffer)
{
- int dev = block_dev->dev;
+ int dev = block_dev->devnum;
struct host_block_dev *host_dev = find_host_device(dev);
if (os_lseek(host_dev->fd,
start * host_dev->blk_dev.blksz,
@@ -96,7 +96,7 @@ int host_dev_bind(int dev, char *filename)
blk_dev->lba = os_lseek(host_dev->fd, 0, OS_SEEK_END) / blk_dev->blksz;
blk_dev->block_read = host_block_read;
blk_dev->block_write = host_block_write;
- blk_dev->dev = dev;
+ blk_dev->devnum = dev;
blk_dev->part_type = PART_TYPE_UNKNOWN;
part_init(blk_dev);
diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c
index b921dcd..09fe834 100644
--- a/drivers/block/systemace.c
+++ b/drivers/block/systemace.c
@@ -111,7 +111,7 @@ struct blk_desc *systemace_get_dev(int dev)
not yet initialized. In that case, fill it in. */
if (systemace_dev.blksz == 0) {
systemace_dev.if_type = IF_TYPE_UNKNOWN;
- systemace_dev.dev = 0;
+ systemace_dev.devnum = 0;
systemace_dev.part_type = PART_TYPE_UNKNOWN;
systemace_dev.type = DEV_TYPE_HARDDISK;
systemace_dev.blksz = 512;