diff options
author | Simon Glass <sjg@chromium.org> | 2016-05-01 11:36:12 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-05-17 09:54:43 -0600 |
commit | a6331fa83cb4a1557df4acfa4214d556f4596904 (patch) | |
tree | 6388b62dadc61ea9366471b81ebd9714625b3bc7 /disk | |
parent | d97dc8a0e6d38d11848ee78669639324edc0df01 (diff) | |
download | u-boot-midas-a6331fa83cb4a1557df4acfa4214d556f4596904.tar.gz u-boot-midas-a6331fa83cb4a1557df4acfa4214d556f4596904.tar.bz2 u-boot-midas-a6331fa83cb4a1557df4acfa4214d556f4596904.zip |
dm: disk: Use legacy block driver info for block device access
Instead of calling xx_get_dev() functions for each interface type, use the
new legacy block driver which can provide the device through its interface.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'disk')
-rw-r--r-- | disk/part.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/disk/part.c b/disk/part.c index 2613bff22c..f055c74aa8 100644 --- a/disk/part.c +++ b/disk/part.c @@ -72,7 +72,6 @@ static struct part_driver *part_driver_lookup_type(int part_type) static struct blk_desc *get_dev_hwpart(const char *ifname, int dev, int hwpart) { const struct block_drvr *drvr = block_drvr; - struct blk_desc* (*reloc_get_dev)(int dev); int (*select_hwpart)(int dev_num, int hwpart); char *name; int ret; @@ -86,16 +85,16 @@ static struct blk_desc *get_dev_hwpart(const char *ifname, int dev, int hwpart) #endif while (drvr->name) { name = drvr->name; - reloc_get_dev = drvr->get_dev; select_hwpart = drvr->select_hwpart; #ifdef CONFIG_NEEDS_MANUAL_RELOC name += gd->reloc_off; - reloc_get_dev += gd->reloc_off; if (select_hwpart) select_hwpart += gd->reloc_off; #endif if (strncmp(ifname, name, strlen(name)) == 0) { - struct blk_desc *dev_desc = reloc_get_dev(dev); + struct blk_desc *dev_desc; + + dev_desc = blk_get_devnum_by_typename(name, dev); if (!dev_desc) return NULL; if (hwpart == 0 && !select_hwpart) |