diff options
| author | Abhishek Pandit-Subedi <abhishekpandit@chromium.org> | 2024-12-13 15:35:42 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-24 08:56:05 +0100 |
| commit | 8541bf0239b8509ecc1192b2e26768a36fd9c944 (patch) | |
| tree | 0aaf3dcdb92daf6888a4782c04dd9bd6b12fbcaa /drivers/usb/typec/class.c | |
| parent | usb: dwc3: gadget: Fix incorrect UDC state after manual deconfiguration (diff) | |
| download | linux-8541bf0239b8509ecc1192b2e26768a36fd9c944.tar.gz linux-8541bf0239b8509ecc1192b2e26768a36fd9c944.zip | |
usb: typec: Only use SVID for matching altmodes
Mode in struct typec_altmode is used to indicate the index of the
altmode on a port, partner or plug. It is used in enter mode VDMs but
doesn't make much sense for matching against altmode drivers or for
matching partner to port altmodes.
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Link: https://lore.kernel.org/r/20241213153543.v5.1.Ie0d37646f18461234777d88b4c3e21faed92ed4f@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/class.c')
| -rw-r--r-- | drivers/usb/typec/class.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index 4b3047e055a3..febe453b96be 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -237,13 +237,13 @@ static int altmode_match(struct device *dev, void *data) if (!is_typec_altmode(dev)) return 0; - return ((adev->svid == id->svid) && (adev->mode == id->mode)); + return (adev->svid == id->svid); } static void typec_altmode_set_partner(struct altmode *altmode) { struct typec_altmode *adev = &altmode->adev; - struct typec_device_id id = { adev->svid, adev->mode, }; + struct typec_device_id id = { adev->svid }; struct typec_port *port = typec_altmode2port(adev); struct altmode *partner; struct device *dev; |
