From 7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 7 Dec 2015 11:38:48 -0700 Subject: block: pass block dev not num to read/write/erase() This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren Reviewed-by: Tom Rini --- drivers/block/systemace.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/block/systemace.c') diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index fdf75b5abf..b974e80167 100644 --- a/drivers/block/systemace.c +++ b/drivers/block/systemace.c @@ -69,8 +69,9 @@ static u16 ace_readw(unsigned off) return in16(base + off); } -static unsigned long systemace_read(int dev, unsigned long start, - lbaint_t blkcnt, void *buffer); +static unsigned long systemace_read(block_dev_desc_t *block_dev, + unsigned long start, lbaint_t blkcnt, + void *buffer); static block_dev_desc_t systemace_dev = { 0 }; @@ -136,8 +137,9 @@ block_dev_desc_t *systemace_get_dev(int dev) * the dev_desc) to read blocks of data. The return value is the * number of blocks read. A zero return indicates an error. */ -static unsigned long systemace_read(int dev, unsigned long start, - lbaint_t blkcnt, void *buffer) +static unsigned long systemace_read(block_dev_desc_t *block_dev, + unsigned long start, lbaint_t blkcnt, + void *buffer) { int retry; unsigned blk_countdown; -- cgit v1.2.3