From 2a981dc2c62c500110aad297fa70503aec36e689 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 29 Feb 2016 15:25:52 -0700 Subject: dm: block: Adjust device calls to go through helpers function To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Stephen Warren --- disk/part_iso.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'disk/part_iso.c') diff --git a/disk/part_iso.c b/disk/part_iso.c index c78ae21bf3..76eab3915f 100644 --- a/disk/part_iso.c +++ b/disk/part_iso.c @@ -63,7 +63,7 @@ int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num, /* the first sector (sector 0x10) must be a primary volume desc */ blkaddr=PVD_OFFSET; - if (dev_desc->block_read(dev_desc, PVD_OFFSET, 1, (ulong *)tmpbuf) != 1) + if (blk_dread(dev_desc, PVD_OFFSET, 1, (ulong *)tmpbuf) != 1) return -1; if(ppr->desctype!=0x01) { if(verb) @@ -85,7 +85,7 @@ int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num, PRINTF(" Lastsect:%08lx\n",lastsect); for(i=blkaddr;iblock_read(dev_desc, i, 1, (ulong *)tmpbuf) != 1) + if (blk_dread(dev_desc, i, 1, (ulong *)tmpbuf) != 1) return -1; if(ppr->desctype==0x00) break; /* boot entry found */ @@ -105,7 +105,7 @@ int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num, } bootaddr=le32_to_int(pbr->pointer); PRINTF(" Boot Entry at: %08lX\n",bootaddr); - if (dev_desc->block_read(dev_desc, bootaddr, 1, (ulong *)tmpbuf) != 1) { + if (blk_dread(dev_desc, bootaddr, 1, (ulong *)tmpbuf) != 1) { if(verb) printf ("** Can't read Boot Entry at %lX on %d:%d **\n", bootaddr, dev_desc->devnum, part_num); -- cgit v1.2.1