[U-Boot] [PATCH v2 10/13] dm: usb: Use blk_dread/write() instead of direct calls
Simon Glass
sjg at chromium.org
Wed Jul 6 01:10:17 CEST 2016
Update the USB mass storage code to allow it to work with driver model.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Add new patch to use blk_dread/write() instead of direct calls
cmd/usb_mass_storage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index b05913a..86398fc 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;
--
2.8.0.rc3.226.g39d4020
More information about the U-Boot
mailing list