summaryrefslogtreecommitdiff
path: root/cmd/usb_mass_storage.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-05 17:10:17 -0600
committerSimon Glass <sjg@chromium.org>2016-07-27 14:15:54 -0600
commitc9f3c5f9c36127c4221bec7d790d44503d4da5a3 (patch)
tree5d85dc982f16445ae9472818c5e12e07847a5b80 /cmd/usb_mass_storage.c
parentf1a485aa404bf4483ecc5eae4423fb334ca68bd3 (diff)
dm: usb: Use blk_dread/write() instead of direct calls
Update the USB mass storage code to allow it to work with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/usb_mass_storage.c')
-rw-r--r--cmd/usb_mass_storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index b05913ac34..86398fc24e 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -22,7 +22,7 @@ static int ums_read_sector(struct ums *ums_dev,
struct blk_desc *block_dev = &ums_dev->block_dev;
lbaint_t blkstart = start + ums_dev->start_sector;
- return block_dev->block_read(block_dev, blkstart, blkcnt, buf);
+ return blk_dread(block_dev, blkstart, blkcnt, buf);
}
static int ums_write_sector(struct ums *ums_dev,
@@ -31,7 +31,7 @@ static int ums_write_sector(struct ums *ums_dev,
struct blk_desc *block_dev = &ums_dev->block_dev;
lbaint_t blkstart = start + ums_dev->start_sector;
- return block_dev->block_write(block_dev, blkstart, blkcnt, buf);
+ return blk_dwrite(block_dev, blkstart, blkcnt, buf);
}
static struct ums *ums;