summaryrefslogtreecommitdiffstats
path: root/common/partitions
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-04-04 13:59:21 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-31 09:34:48 +0200
commite82e40523f8df1c10b6646798065115119aea9a8 (patch)
tree2fa821d7e68a6ff78233277ae5980ab7c7ce7381 /common/partitions
parentb5c4e238d38adf76c4648494ae6eeb62345bd086 (diff)
downloadbarebox-e82e40523f8df1c10b6646798065115119aea9a8.tar.gz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'common/partitions')
-rw-r--r--common/partitions/efi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/partitions/efi.c b/common/partitions/efi.c
index e450eeb..ee1326e 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;