Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7479512 authored by Vikram Pandita's avatar Vikram Pandita Committed by Greg Kroah-Hartman
Browse files

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: default avatarVikram Pandita <vikram.pandita@ti.com>
Acked-by: default avatarFelipe Balbi <me@felipebalbi.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5c23c907
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
#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