All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: typec: Remove retimers properly
@ 2022-08-25 14:04 Heikki Krogerus
  2022-08-25 17:19 ` Prashant Malani
  0 siblings, 1 reply; 2+ messages in thread
From: Heikki Krogerus @ 2022-08-25 14:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Prashant Malani, linux-usb

Retimer device class is left dangling when the typec module
is unloaded. Attempts to reload the module failed with warning:

        "sysfs: cannot create duplicate filename '/class/retimer'"

Fixing the issue by unregistering the class properly.

Fixes: ddaf8d96f93b ("usb: typec: Add support for retimers")
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/usb/typec/class.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index ebc29ec20e3fb..bd5e5dd704313 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -2346,6 +2346,7 @@ static void __exit typec_exit(void)
 	ida_destroy(&typec_index_ida);
 	bus_unregister(&typec_bus);
 	class_unregister(&typec_mux_class);
+	class_unregister(&retimer_class);
 }
 module_exit(typec_exit);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: typec: Remove retimers properly
  2022-08-25 14:04 [PATCH] usb: typec: Remove retimers properly Heikki Krogerus
@ 2022-08-25 17:19 ` Prashant Malani
  0 siblings, 0 replies; 2+ messages in thread
From: Prashant Malani @ 2022-08-25 17:19 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Greg Kroah-Hartman, linux-usb

Hi Heikki,

Thanks for finding this.

On Aug 25 17:04, Heikki Krogerus wrote:
> Retimer device class is left dangling when the typec module
> is unloaded. Attempts to reload the module failed with warning:
> 
>         "sysfs: cannot create duplicate filename '/class/retimer'"
> 
> Fixing the issue by unregistering the class properly.
> 
> Fixes: ddaf8d96f93b ("usb: typec: Add support for retimers")
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Prashant Malani <pmalani@chromium.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-25 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 14:04 [PATCH] usb: typec: Remove retimers properly Heikki Krogerus
2022-08-25 17:19 ` Prashant Malani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.