Skip to contentSkip to conversation

xen: pvblock: Use uclass_probe_all

PATCH In review Michal Suchanek 3 participants 3 messages Oct 22, 2022 – Nov 3, 2022 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: pvblock: Use uclass_probe_all

Also eliminate useless code and variables.

---

 drivers/xen/pvblock.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/xen/pvblock.c +2 -7
index 95e298d7dd..4ad548d599 100644
@@ -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();
 }
Signature · 1 line
2.38.0