Skip to content
Snippets Groups Projects
Commit c9f3c5f9 authored by Simon Glass's avatar Simon Glass
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent f1a485aa
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment