Re: [spice-gtk 02/13] usb-redir: remove unused 'subsystem' parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Christophe

> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]