static unsigned dp_part_size(struct blk_desc *desc, int part)
{
unsigned dpsize;
- struct udevice *dev;
- int ret;
+ struct udevice *dev = desc->bdev;
- ret = blk_find_device(desc->if_type, desc->devnum, &dev);
-
- if (ret)
- dev = desc->bdev->parent;
dpsize = dp_size(dev);
if (part == 0) /* the actual disk, not a partition */
*/
static void *dp_part_fill(void *buf, struct blk_desc *desc, int part)
{
- struct udevice *dev;
- int ret;
-
- ret = blk_find_device(desc->if_type, desc->devnum, &dev);
+ struct udevice *dev = desc->bdev;
- if (ret)
- dev = desc->bdev->parent;
buf = dp_fill(buf, dev);
if (part == 0) /* the actual disk, not a partition */