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 <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c
index 73f4c4a..170f0fa 100644
--- a/drivers/block/sandbox.c
+++ b/drivers/block/sandbox.c
@@ -22,9 +22,11 @@
 	return NULL;
 }
 
-static unsigned long host_block_read(int dev, unsigned long start,
-				     lbaint_t blkcnt, void *buffer)
+static unsigned long host_block_read(block_dev_desc_t *block_dev,
+				     unsigned long start, lbaint_t blkcnt,
+				     void *buffer)
 {
+	int dev = block_dev->dev;
 	struct host_block_dev *host_dev = find_host_device(dev);
 
 	if (!host_dev)
@@ -42,9 +44,11 @@
 	return -1;
 }
 
-static unsigned long host_block_write(int dev, unsigned long start,
-				      lbaint_t blkcnt, const void *buffer)
+static unsigned long host_block_write(block_dev_desc_t *block_dev,
+				      unsigned long start, lbaint_t blkcnt,
+				      const void *buffer)
 {
+	int dev = block_dev->dev;
 	struct host_block_dev *host_dev = find_host_device(dev);
 	if (os_lseek(host_dev->fd,
 		     start * host_dev->blk_dev.blksz,