vbox: Drop UIUSBCommon::Enable()

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>
This commit is contained in:
Michal Privoznik 2023-01-22 13:04:52 +01:00
parent 6f0ed13b52
commit 18b7857426
3 changed files with 0 additions and 10 deletions

View 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;

View 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,

View 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);