[PATCH] usb: musb_dsps: fix the exit routine for debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following commit introduced the debugfs :

40f099e32c2a06bad7d75683421e30fcc74924cd
Author: Markus Pargmann <mpa@xxxxxxxxxxxxxx>
Date:   Fri Jan 17 10:22:35 2014 +0100

    usb: musb: dsps, debugfs files

Unfortunately, a forgotten call to a cleanup function prevents the
probing of musb in case of deferred probe.

Because musb_init_controller() often retries and creates a new debugfs
directory each time it is called, we need to remove that directory in case the
initialization fails. Otherwise, the debugfs_create_dir() fails at
subsequent calls because the directory already exists.

Fixed by calling debugfs_remove_recursive() in the exit function.

Signed-off-by: Olivier Gayot <ogayot@xxxxxxxxxxxx>
Cc: Markus Pargmann <mpa@xxxxxxxxxxxxxx>
---
 drivers/usb/musb/musb_dsps.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 3372ded..c3de0a5 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -471,6 +471,8 @@ static int dsps_musb_exit(struct musb *musb)
 
 	del_timer_sync(&glue->timer);
 
+	debugfs_remove_recursive(glue->dbgfs_root);
+
 	usb_phy_shutdown(musb->xceiv);
 	return 0;
 }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux