提交 e7479512 编写于 作者: V Vikram Pandita 提交者: Greg Kroah-Hartman

USB: musb: fix srp sysfs entry deletion

The SRP sysfs attribute is dependent on gadget mode; any
gadget may support SRP.  But "rmmod musb_hdrc" didn't
remove that attribute; fix.
Signed-off-by: NVikram Pandita <vikram.pandita@ti.com>
Acked-by: NFelipe Balbi <me@felipebalbi.com>
Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5c23c907
...@@ -1816,7 +1816,7 @@ static void musb_free(struct musb *musb) ...@@ -1816,7 +1816,7 @@ static void musb_free(struct musb *musb)
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode); device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_vbus); device_remove_file(musb->controller, &dev_attr_vbus);
#ifdef CONFIG_USB_MUSB_OTG #ifdef CONFIG_USB_GADGET_MUSB_HDRC
device_remove_file(musb->controller, &dev_attr_srp); device_remove_file(musb->controller, &dev_attr_srp);
#endif #endif
#endif #endif
...@@ -2064,7 +2064,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) ...@@ -2064,7 +2064,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode); device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_vbus); device_remove_file(musb->controller, &dev_attr_vbus);
#ifdef CONFIG_USB_MUSB_OTG #ifdef CONFIG_USB_GADGET_MUSB_HDRC
device_remove_file(musb->controller, &dev_attr_srp); device_remove_file(musb->controller, &dev_attr_srp);
#endif #endif
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册