Skip to contentSkip to conversation

hw/usb/bus: Remove the "full-path" property

PATCH In review Thomas Huth 2 participants 2 messages Mar 2, 2021 – Mar 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 hw/usb/bus: Remove the "full-path" property

This property was only required for the pc-1.0 and earlier machine types. Since these have been removed now, we can delete the property as well.

---
v2: Remove the USB_DEV_FLAG_FULL_PATH constant completely

 hw/usb/bus.c     | 7 +------
 include/hw/usb.h | 1 -
 2 files changed, 1 insertion(+), 7 deletions(-)
hw/usb/bus.c +1 -6
index 064f94e9c3..df7411fea8 100644
@@ -19,8 +19,6 @@ static void usb_qdev_unrealize(DeviceState *qdev);
 static Property usb_props[] = {
     DEFINE_PROP_STRING("port", USBDevice, port_path),
     DEFINE_PROP_STRING("serial", USBDevice, serial),
-    DEFINE_PROP_BIT("full-path", USBDevice, flags,
-                    USB_DEV_FLAG_FULL_PATH, true),
     DEFINE_PROP_BIT("msos-desc", USBDevice, flags,
                     USB_DEV_FLAG_MSOS_DESC_ENABLE, true),
     DEFINE_PROP_STRING("pcap", USBDevice, pcap_filename),
@@ -596,11 +594,8 @@ static char *usb_get_dev_path(DeviceState *qdev)
 {
     USBDevice *dev = USB_DEVICE(qdev);
     DeviceState *hcd = qdev->parent_bus->parent;
-    char *id = NULL;
+    char *id = qdev_get_dev_path(hcd);
 
-    if (dev->flags & (1 << USB_DEV_FLAG_FULL_PATH)) {
-        id = qdev_get_dev_path(hcd);
-    }
     if (id) {
         char *ret = g_strdup_printf("%s/%s", id, dev->port->path);
         g_free(id);
include/hw/usb.h +0 -1
index abfbfc5284..9f42394efa 100644
@@ -216,7 +216,6 @@ struct USBEndpoint {
 };
 
 enum USBDeviceFlags {
-    USB_DEV_FLAG_FULL_PATH,
     USB_DEV_FLAG_IS_HOST,
     USB_DEV_FLAG_MSOS_DESC_ENABLE,
     USB_DEV_FLAG_MSOS_DESC_IN_USE,
Signature · 1 line
2.27.0
#1 lore raw
Quoted 7 lines · Thomas Huth

This property was only required for the pc-1.0 and earlier machine types. Since these have been removed now, we can delete the property as well.

---
v2: Remove the USB_DEV_FLAG_FULL_PATH constant completely

Added to usb queue.

thanks,
Gerd