]> xenbits.xensource.com Git - libvirt.git/commitdiff
vbox: Drop UIUSBCommon::Enable()
authorMichal Privoznik <mprivozn@redhat.com>
Sun, 22 Jan 2023 12:04:52 +0000 (13:04 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Jan 2023 09:24:00 +0000 (10:24 +0100)
The UIUSBCommon::Enable() function is no longer needed as it is a
NOP. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/vbox/vbox_common.c
src/vbox/vbox_tmpl.c
src/vbox/vbox_uniformed_api.h

index c769a517a9cc8d4af55f3044777bb7b9e3c828af..6d26e7c05142c9b5b466e66d18f3d305461e63e3 100644 (file)
@@ -1749,7 +1749,6 @@ vboxAttachUSB(virDomainDef *def, struct _vboxDriver *data, IMachine *machine)
     rc = gVBoxAPI.UIMachine.GetUSBCommon(machine, &USBCommon);
     if (NS_FAILED(rc) || !USBCommon)
         return;
-    gVBoxAPI.UIUSBCommon.Enable(USBCommon);
 
     for (i = 0; i < def->nhostdevs; i++) {
         char *filtername = NULL;
index c570dd580210106288fe6f1a1aaa46efe4edf48a..5cd30ed01917ee701b0afd92285885e226ef715f 100644 (file)
@@ -1679,13 +1679,6 @@ _vrdeServerSetNetAddress(struct _vboxDriver *data,
     return rc;
 }
 
-static nsresult
-_usbCommonEnable(IUSBCommon *USBCommon G_GNUC_UNUSED)
-{
-    /* We don't need to set usb enabled for vbox 4.3 and later */
-    return 0;
-}
-
 static nsresult
 _usbCommonGetEnabled(IUSBCommon *USBCommon G_GNUC_UNUSED, PRBool *enabled)
 {
@@ -2414,7 +2407,6 @@ static vboxUniformedIVRDEServer _UIVRDEServer = {
 };
 
 static vboxUniformedIUSBCommon _UIUSBCommon = {
-    .Enable = _usbCommonEnable,
     .GetEnabled = _usbCommonGetEnabled,
     .CreateDeviceFilter = _usbCommonCreateDeviceFilter,
     .InsertDeviceFilter = _usbCommonInsertDeviceFilter,
index 3a9c317092fe5925eab756bf0f4118c000cf8634..23fb769c374a22c20740539059ae14dc4f0b597f 100644 (file)
@@ -354,7 +354,6 @@ typedef struct {
 
 /* Common Functions for IUSBController and IUSBDeviceFilters */
 typedef struct {
-    nsresult (*Enable)(IUSBCommon *USBCommon);
     nsresult (*GetEnabled)(IUSBCommon *USBCommon, PRBool *enabled);
     nsresult (*CreateDeviceFilter)(IUSBCommon *USBCommon, PRUnichar *name,
                                    IUSBDeviceFilter **filter);