diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2008-09-11 04:53:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:40:59 -0400 |
commit | 28c2c51c078296151549f4f0e823e804f773861b (patch) | |
tree | ec7617adf5885ef6128b0f95fb843b8d7fed8c9f /drivers/usb | |
parent | 458e6a511f9dc91e5af5e64740b0a5c9650a25fb (diff) |
usb: musb: remove dead code from procfs
When removing the procfs file, I forgot to remove some
code that created and removed that file. Here's a patch
to fix it. Ideally this patch will be melded into the patch
removing the procfs file, don't know if it's possible still.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index d5af6b0d8af5..4a35745b30be 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2055,15 +2055,6 @@ bad_config: | |||
2055 | 2055 | ||
2056 | } | 2056 | } |
2057 | 2057 | ||
2058 | return 0; | ||
2059 | |||
2060 | fail: | ||
2061 | if (musb->clock) | ||
2062 | clk_put(musb->clock); | ||
2063 | device_init_wakeup(dev, 0); | ||
2064 | musb_free(musb); | ||
2065 | return status; | ||
2066 | |||
2067 | #ifdef CONFIG_SYSFS | 2058 | #ifdef CONFIG_SYSFS |
2068 | status = device_create_file(dev, &dev_attr_mode); | 2059 | status = device_create_file(dev, &dev_attr_mode); |
2069 | status = device_create_file(dev, &dev_attr_vbus); | 2060 | status = device_create_file(dev, &dev_attr_vbus); |
@@ -2072,12 +2063,31 @@ fail: | |||
2072 | #endif /* CONFIG_USB_GADGET_MUSB_HDRC */ | 2063 | #endif /* CONFIG_USB_GADGET_MUSB_HDRC */ |
2073 | status = 0; | 2064 | status = 0; |
2074 | #endif | 2065 | #endif |
2066 | if (status) | ||
2067 | goto fail2; | ||
2075 | 2068 | ||
2076 | return status; | 2069 | return 0; |
2077 | 2070 | ||
2078 | fail2: | 2071 | fail2: |
2072 | #ifdef CONFIG_SYSFS | ||
2073 | device_remove_file(musb->controller, &dev_attr_mode); | ||
2074 | device_remove_file(musb->controller, &dev_attr_vbus); | ||
2075 | #ifdef CONFIG_USB_MUSB_OTG | ||
2076 | device_remove_file(musb->controller, &dev_attr_srp); | ||
2077 | #endif | ||
2078 | #endif | ||
2079 | musb_platform_exit(musb); | 2079 | musb_platform_exit(musb); |
2080 | goto fail; | 2080 | fail: |
2081 | dev_err(musb->controller, | ||
2082 | "musb_init_controller failed with status %d\n", status); | ||
2083 | |||
2084 | if (musb->clock) | ||
2085 | clk_put(musb->clock); | ||
2086 | device_init_wakeup(dev, 0); | ||
2087 | musb_free(musb); | ||
2088 | |||
2089 | return status; | ||
2090 | |||
2081 | } | 2091 | } |
2082 | 2092 | ||
2083 | /*-------------------------------------------------------------------------*/ | 2093 | /*-------------------------------------------------------------------------*/ |