From 2a981dc2c62c500110aad297fa70503aec36e689 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 29 Feb 2016 15:25:52 -0700 Subject: dm: block: Adjust device calls to go through helpers function To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Stephen Warren --- fs/fat/fat_write.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/fat/fat_write.c') diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index 5ed324ce1a..baa85ec3b4 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -32,7 +32,7 @@ static int disk_write(__u32 block, __u32 nr_blocks, void *buf) { ulong ret; - if (!cur_dev || !cur_dev->block_write) + if (!cur_dev) return -1; if (cur_part_info.start + block + nr_blocks > @@ -41,8 +41,7 @@ static int disk_write(__u32 block, __u32 nr_blocks, void *buf) return -1; } - ret = cur_dev->block_write(cur_dev, cur_part_info.start + block, - nr_blocks, buf); + ret = blk_dwrite(cur_dev, cur_part_info.start + block, nr_blocks, buf); if (nr_blocks && ret == 0) return -1; -- cgit v1.2.1