spicevmc: Remove reds parameter from spicevmc_device_disconnect

Unused.
Also the devices should be able to release themselves.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-05-30 09:39:58 +01:00
parent 67c7dacd07
commit 2160b1ea39
3 changed files with 3 additions and 4 deletions

View File

@ -237,8 +237,7 @@ void red_char_device_write_buffer_release(RedCharDevice *dev,
RedCharDevice *spicevmc_device_connect(RedsState *reds,
SpiceCharDeviceInstance *sin,
uint8_t channel_type);
void spicevmc_device_disconnect(RedsState *reds,
SpiceCharDeviceInstance *char_device);
void spicevmc_device_disconnect(SpiceCharDeviceInstance *char_device);
SpiceCharDeviceInterface *spice_char_device_get_interface(SpiceCharDeviceInstance *instance);

View File

@ -3379,7 +3379,7 @@ static int spice_server_char_device_remove_interface(RedsState *reds, SpiceBaseI
#endif
else if (strcmp(char_device->subtype, SUBTYPE_USBREDIR) == 0 ||
strcmp(char_device->subtype, SUBTYPE_PORT) == 0) {
spicevmc_device_disconnect(reds, char_device);
spicevmc_device_disconnect(char_device);
} else {
spice_warning("failed to remove char device %s", char_device->subtype);
}

View File

@ -812,7 +812,7 @@ RedCharDevice *spicevmc_device_connect(RedsState *reds,
}
/* Must be called from RedClient handling thread. */
void spicevmc_device_disconnect(RedsState *reds, SpiceCharDeviceInstance *sin)
void spicevmc_device_disconnect(SpiceCharDeviceInstance *sin)
{
g_object_unref(RED_CHAR_DEVICE(sin->st));
sin->st = NULL;