]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - disk/part_iso.c
block: pass block dev not num to read/write/erase()
[people/ms/u-boot.git] / disk / part_iso.c
index 2547c703db54d02dd12ae891ec299042b4906e94..0b1ac606374bbbf781e95dbe0ebf886335703bf7 100644 (file)
@@ -62,8 +62,8 @@ int get_partition_info_iso_verb(block_dev_desc_t * dev_desc, int part_num, disk_
 
        /* the first sector (sector 0x10) must be a primary volume desc */
        blkaddr=PVD_OFFSET;
-       if (dev_desc->block_read (dev_desc->dev, PVD_OFFSET, 1, (ulong *) tmpbuf) != 1)
-       return (-1);
+       if (dev_desc->block_read(dev_desc, PVD_OFFSET, 1, (ulong *)tmpbuf) != 1)
+               return -1;
        if(ppr->desctype!=0x01) {
                if(verb)
                        printf ("** First descriptor is NOT a primary desc on %d:%d **\n",
@@ -84,8 +84,8 @@ int get_partition_info_iso_verb(block_dev_desc_t * dev_desc, int part_num, disk_
        PRINTF(" Lastsect:%08lx\n",lastsect);
        for(i=blkaddr;i<lastsect;i++) {
                PRINTF("Reading block %d\n", i);
-               if (dev_desc->block_read (dev_desc->dev, i, 1, (ulong *) tmpbuf) != 1)
-               return (-1);
+               if (dev_desc->block_read(dev_desc, i, 1, (ulong *)tmpbuf) != 1)
+                       return -1;
                if(ppr->desctype==0x00)
                        break; /* boot entry found */
                if(ppr->desctype==0xff) {
@@ -104,7 +104,7 @@ int get_partition_info_iso_verb(block_dev_desc_t * dev_desc, int part_num, disk_
        }
        bootaddr=le32_to_int(pbr->pointer);
        PRINTF(" Boot Entry at: %08lX\n",bootaddr);
-       if (dev_desc->block_read (dev_desc->dev, bootaddr, 1, (ulong *) tmpbuf) != 1) {
+       if (dev_desc->block_read(dev_desc, bootaddr, 1, (ulong *)tmpbuf) != 1) {
                if(verb)
                        printf ("** Can't read Boot Entry at %lX on %d:%d **\n",
                                bootaddr,dev_desc->dev, part_num);