lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X9KXiaM4wYKkxJw5@google.com>
Date:   Thu, 10 Dec 2020 13:47:53 -0800
From:   Benson Leung <bleung@...omium.org>
To:     Prashant Malani <pmalani@...omium.org>
Cc:     linux-usb@...r.kernel.org, gregkh@...uxfoundation.org,
        heikki.krogerus@...ux.intel.com, bleung@...omium.org,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] usb: typec: Add class for plug alt mode device

Hi Prashant,

On Thu, Dec 10, 2020 at 01:16:54PM -0800, Prashant Malani wrote:
> Add the Type C class for plug alternate mode devices which are being
> registered by the Type C connector class. This ensures that udev events
> get generated when the plug alt modes are registered.
> 
> Signed-off-by: Prashant Malani <pmalani@...omium.org>
> Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

Reviewed-by: Benson Leung <bleung@...omium.org>


> ---
> 
> Changes in v2:
> - Changed code to set the class member instead of bus.
> - Removed the alteration to typec_bus.rst since it's not longer
>   required.
> - Updated the commit message and subject to reflect the change in code.
> 
> v1: https://lore.kernel.org/linux-usb/20201203030846.51669-1-pmalani@chromium.org/
> 
>  drivers/usb/typec/class.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index 35eec707cb51..29d05b45cc9d 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -482,6 +482,10 @@ typec_register_altmode(struct device *parent,
>  	if (is_typec_partner(parent))
>  		alt->adev.dev.bus = &typec_bus;
>  
> +	/* Plug alt modes need a class to generate udev events. */
> +	if (is_typec_plug(parent))
> +		alt->adev.dev.class = typec_class;
> +
>  	ret = device_register(&alt->adev.dev);
>  	if (ret) {
>  		dev_err(parent, "failed to register alternate mode (%d)\n",
> -- 
> 2.29.2.576.ga3fc446d84-goog
> 

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@...gle.com
Chromium OS Project
bleung@...omium.org

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ