From e82e40523f8df1c10b6646798065115119aea9a8 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Apr 2013 13:59:21 +0200 Subject: block: implement block_read/block_write functions Some drivers use blk->ops->read/write. This bypasses the caching block layer and was never intended like this. The upper API to the block layer is the cdev layer. This patch adds block_read and block_write functions and uses them where appropriate. Signed-off-by: Sascha Hauer --- common/partitions/efi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/partitions') diff --git a/common/partitions/efi.c b/common/partitions/efi.c index e450eebf77..ee1326e622 100644 --- a/common/partitions/efi.c +++ b/common/partitions/efi.c @@ -86,7 +86,7 @@ static gpt_entry *alloc_read_gpt_entries(struct block_device *blk, from = le64_to_cpu(pgpt_head->partition_entry_lba); size = count / GPT_BLOCK_SIZE; - ret = blk->ops->read(blk, pte, from, size); + ret = block_read(blk, pte, from, size); if (ret) { kfree(pte); pte=NULL; @@ -121,7 +121,7 @@ static gpt_header *alloc_read_gpt_header(struct block_device *blk, if (!gpt) return NULL; - ret = blk->ops->read(blk, gpt, lba, 1); + ret = block_read(blk, gpt, lba, 1); if (ret) { kfree(gpt); gpt=NULL; -- cgit v1.2.3