aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2008-08-10 21:22:34 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2008-08-21 10:26:33 -0700
commit746cdd0b2d1254b11382789b6630c4d379bdcf13 (patch)
tree6c4e9ab788b727a16938388f4e45c5f582f6ab99 /drivers/usb/musb/musb_core.c
parentbf31338bfd5d04434adf2294255847bb7dad687a (diff)
usb: musb: get rid of procfs entry
Drivers should not add procfs. The functionality in the old procfs file will be moved to debugfs. Cc: Anand Gadiyar <gadiyar@ti.com> Cc: Bryan Wu <bryan.wu@analog.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index d68ec6daf33..99690ba436d 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2037,6 +2037,8 @@ bad_config:
musb->xceiv.state = OTG_STATE_A_IDLE;
status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
+ if (status)
+ goto fail;
DBG(1, "%s mode, status %d, devctl %02x %c\n",
"HOST", status,
@@ -2051,6 +2053,8 @@ bad_config:
musb->xceiv.state = OTG_STATE_B_IDLE;
status = musb_gadget_setup(musb);
+ if (status)
+ goto fail;
DBG(1, "%s mode, status %d, dev%02x\n",
is_otg_enabled(musb) ? "OTG" : "PERIPHERAL",
@@ -2059,16 +2063,14 @@ bad_config:
}
- if (status == 0)
- musb_debug_create("driver/musb_hdrc", musb);
- else {
+ return 0;
+
fail:
- if (musb->clock)
- clk_put(musb->clock);
- device_init_wakeup(dev, 0);
- musb_free(musb);
- return status;
- }
+ if (musb->clock)
+ clk_put(musb->clock);
+ device_init_wakeup(dev, 0);
+ musb_free(musb);
+ return status;
#ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode);
@@ -2131,7 +2133,6 @@ static int __devexit musb_remove(struct platform_device *pdev)
* - OTG mode: both roles are deactivated (or never-activated)
*/
musb_shutdown(pdev);
- musb_debug_delete("driver/musb_hdrc", musb);
#ifdef CONFIG_USB_MUSB_HDRC_HCD
if (musb->board_mode == MUSB_HOST)
usb_remove_hcd(musb_to_hcd(musb));