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.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/partitions.c') diff --git a/common/partitions.c b/common/partitions.c index 683b2586e4..35a604c35f 100644 --- a/common/partitions.c +++ b/common/partitions.c @@ -128,7 +128,7 @@ int parse_partition_table(struct block_device *blk) pdesc = xzalloc(sizeof(*pdesc)); buf = dma_alloc(SECTOR_SIZE * 2); - rc = blk->ops->read(blk, buf, 0, 2); + rc = block_read(blk, buf, 0, 2); if (rc != 0) { dev_err(blk->dev, "Cannot read MBR/partition table\n"); goto on_error; -- cgit v1.2.3