diff options
author | Michal Suchanek <msuchanek@suse.de> | 2022-10-22 16:33:05 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-11-02 13:58:17 -0400 |
commit | 0b999d208230e52d5bc1e082a2491eb25bd59e32 (patch) | |
tree | e092e7bd7fa4e3095ada7ce821e6ae628a18cff8 | |
parent | 44b7abf8dc953f935d1de067cdace9dae2cbfb3c (diff) | |
download | u-boot-0b999d208230e52d5bc1e082a2491eb25bd59e32.tar.gz u-boot-0b999d208230e52d5bc1e082a2491eb25bd59e32.tar.bz2 u-boot-0b999d208230e52d5bc1e082a2491eb25bd59e32.zip |
xen: pvblock: Use uclass_probe_all
Also eliminate useless code and variables.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | drivers/xen/pvblock.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c index 95e298d7dd..4ad548d599 100644 --- a/drivers/xen/pvblock.c +++ b/drivers/xen/pvblock.c @@ -818,8 +818,6 @@ static void print_pvblock_devices(void) void pvblock_init(void) { struct driver_info info; - struct udevice *udev; - struct uclass *uc; int ret; /* @@ -828,15 +826,12 @@ void pvblock_init(void) * virtual block devices. */ info.name = DRV_NAME; - ret = device_bind_by_name(gd->dm_root, false, &info, &udev); + ret = device_bind_by_name(gd->dm_root, false, &info, NULL); if (ret < 0) printf("Failed to bind " DRV_NAME ", ret: %d\n", ret); /* Bootstrap virtual block devices class driver */ - ret = uclass_get(UCLASS_PVBLOCK, &uc); - if (ret) - return; - uclass_foreach_dev_probe(UCLASS_PVBLOCK, udev); + uclass_probe_all(UCLASS_PVBLOCK); print_pvblock_devices(); } |