mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: Vikram Pandita <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
5c23c9078f
commit
e747951240
1 changed files with 2 additions and 2 deletions
|
|
@ -1816,7 +1816,7 @@ static void musb_free(struct musb *musb)
|
|||
#ifdef CONFIG_SYSFS
|
||||
device_remove_file(musb->controller, &dev_attr_mode);
|
||||
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);
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -2064,7 +2064,7 @@ fail2:
|
|||
#ifdef CONFIG_SYSFS
|
||||
device_remove_file(musb->controller, &dev_attr_mode);
|
||||
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);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue