]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/scsi-bus.c
qdev: Use wrapper for qdev_get_path
[mirror_qemu.git] / hw / scsi-bus.c
index a1d75b9cc7122814a8e11bf345a3244be86e3a9a..e79bb54a9d815627655c567928397adc9819b8f0 100644 (file)
@@ -1453,12 +1453,10 @@ static char *scsibus_get_dev_path(DeviceState *dev)
 {
     SCSIDevice *d = DO_UPCAST(SCSIDevice, qdev, dev);
     DeviceState *hba = dev->parent_bus->parent;
-    char *id = NULL;
+    char *id;
     char *path;
 
-    if (hba && hba->parent_bus && hba->parent_bus->info->get_dev_path) {
-        id = hba->parent_bus->info->get_dev_path(hba);
-    }
+    id = qdev_get_dev_path(hba);
     if (id) {
         path = g_strdup_printf("%s/%d:%d:%d", id, d->channel, d->id, d->lun);
     } else {