]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xen: pvblock: Use uclass_probe_all
authorMichal Suchanek <msuchanek@suse.de>
Sat, 22 Oct 2022 14:33:05 +0000 (16:33 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 2 Nov 2022 17:58:17 +0000 (13:58 -0400)
Also eliminate useless code and variables.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/xen/pvblock.c

index 95e298d7ddc24d65ca5dbe400f348c497a21471c..4ad548d599d59753a7a0a09d0d22e2ef1d8f1c60 100644 (file)
@@ -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();
 }