[Spice-devel] [spice-gtk 02/13] usb-redir: remove unused 'subsystem' parameter
Christophe Fergeau
cfergeau at redhat.com
Mon Mar 11 17:07:21 UTC 2019
On Sun, Mar 10, 2019 at 04:46:01PM +0200, Yuri Benditovich wrote:
> Removing unused parameter for GUdevClient constructor.
I'd explicitly mention that it's possible because we no longer use the
external libgudev, and at this point g_udev_client_new() is just
internal API used by the windows code.
Apart from this minor comment,
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
Christophe
>
> Signed-off-by: Yuri Benditovich <yuri.benditovich at daynix.com>
> ---
> src/usb-device-manager.c | 5 +----
> src/win-usb-dev.c | 2 +-
> src/win-usb-dev.h | 2 +-
> 3 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
> index 6a36cfa..6435be8 100644
> --- a/src/usb-device-manager.c
> +++ b/src/usb-device-manager.c
> @@ -283,9 +283,6 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable,
> GList *list;
> GList *it;
> int rc;
> -#ifdef G_OS_WIN32
> - const gchar *const subsystems[] = {"usb", NULL};
> -#endif
>
> /* Initialize libusb */
> rc = libusb_init(&priv->context);
> @@ -305,7 +302,7 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable,
>
> /* Start listening for usb devices plug / unplug */
> #ifdef G_OS_WIN32
> - priv->udev = g_udev_client_new(subsystems);
> + priv->udev = g_udev_client_new();
> if (priv->udev == NULL) {
> g_warning("Error initializing GUdevClient");
> return FALSE;
> diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c
> index 327976d..d0eae06 100644
> --- a/src/win-usb-dev.c
> +++ b/src/win-usb-dev.c
> @@ -104,7 +104,7 @@ GQuark g_udev_client_error_quark(void)
> return g_quark_from_static_string("win-gudev-client-error-quark");
> }
>
> -GUdevClient *g_udev_client_new(const gchar* const *subsystems)
> +GUdevClient *g_udev_client_new(void)
> {
> if (singleton != NULL)
> return g_object_ref(singleton);
> diff --git a/src/win-usb-dev.h b/src/win-usb-dev.h
> index 7f40197..0f34a01 100644
> --- a/src/win-usb-dev.h
> +++ b/src/win-usb-dev.h
> @@ -79,7 +79,7 @@ struct _GUdevClientClass
> };
>
> GType g_udev_client_get_type(void) G_GNUC_CONST;
> -GUdevClient *g_udev_client_new(const gchar* const *subsystems);
> +GUdevClient *g_udev_client_new(void);
> GList *g_udev_client_query_by_subsystem(GUdevClient *client, const gchar *subsystem);
>
> GType g_udev_device_get_type(void) G_GNUC_CONST;
> --
> 2.17.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190311/8a9099fd/attachment-0001.sig>
More information about the Spice-devel
mailing list