From: Vikram Pandita Date: Sat, 21 Feb 2009 23:31:44 +0000 (-0800) Subject: USB: musb: fix srp sysfs entry deletion X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e747951240b9f820b94fd5582663c66d798c8fd1;p=linux-beck.git 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 Acked-by: Felipe Balbi Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 60cbaec1aa41..af77e4659006 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -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