From f84f892f15c75ddedeb550e0168649e7645ca5b0 Mon Sep 17 00:00:00 2001 From: Wu Liang feng Date: Wed, 4 Jan 2017 11:48:31 +0800 Subject: [PATCH] usb: dwc3: rockchip: remove debugfs entry when rmmod dwc3-rockchip module We add debugfs entry in dwc3-rockchip probe, so need to remove it when rmmod this driver module. Change-Id: Ic0f7cf1386ffed8d492b0ba20625c63c549a7cdd Signed-off-by: William Wu --- drivers/usb/dwc3/dwc3-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-rockchip.c b/drivers/usb/dwc3/dwc3-rockchip.c index c993e44f3f3c..00e47f744310 100644 --- a/drivers/usb/dwc3/dwc3-rockchip.c +++ b/drivers/usb/dwc3/dwc3-rockchip.c @@ -742,6 +742,8 @@ static int dwc3_rockchip_remove(struct platform_device *pdev) dwc3_rockchip_extcon_unregister(rockchip); + debugfs_remove_recursive(rockchip->root); + /* Restore hcd state before unregistering xhci */ if (rockchip->edev && !rockchip->connected) { struct usb_hcd *hcd =