aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/typec/class.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-21 08:53:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-21 08:53:43 +0200
commitc6d9e43954bfa7415a1e9efdb2806ec1d8a8afc8 (patch)
tree4f8b23679ea48fcfbee582f876f62e144c71f8d7 /drivers/usb/typec/class.c
parentxhci: add helper to stop endpoint and wait for completion (diff)
parentLinux 6.12-rc4 (diff)
downloadlinux-c6d9e43954bfa7415a1e9efdb2806ec1d8a8afc8.tar.gz
linux-c6d9e43954bfa7415a1e9efdb2806ec1d8a8afc8.zip
Merge 6.12-rc4 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/class.c')
-rw-r--r--drivers/usb/typec/class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index 953cfb1b093e..bd41abceb050 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -526,6 +526,7 @@ static void typec_altmode_release(struct device *dev)
typec_altmode_put_partner(alt);
altmode_id_remove(alt->adev.dev.parent, alt->id);
+ put_device(alt->adev.dev.parent);
kfree(alt);
}
@@ -575,6 +576,8 @@ typec_register_altmode(struct device *parent,
alt->adev.dev.type = &typec_altmode_dev_type;
dev_set_name(&alt->adev.dev, "%s.%u", dev_name(parent), id);
+ get_device(alt->adev.dev.parent);
+
/* Link partners and plugs with the ports */
if (!is_port)
typec_altmode_set_partner(alt);