]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: tcpm/tcpci_maxim: use device managed TCPCI port deregistration
authorAndré Draszik <andre.draszik@linaro.org>
Wed, 10 Jul 2024 10:36:22 +0000 (11:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Aug 2024 10:49:31 +0000 (12:49 +0200)
commite50f0887804e60584dc3223a06980597b7e8b2a8
tree8db5a34010d3637f9619dd012d401200ef036d29
parent6ba97b42a5f2e04367ae006f65f46f6c1ec78c0b
usb: typec: tcpm/tcpci_maxim: use device managed TCPCI port deregistration

Instead of open-coding the call to tcpci_unregister_port() in various
places, let's just register a hook using devm_add_action_or_reset() so
that it gets called automatically as and when necessary by the device
management APIs.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240710-tcpc-cleanup-v1-15-0ec1f41f4263@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpci_maxim_core.c