aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/blackfin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/blackfin.c')
-rw-r--r--drivers/usb/musb/blackfin.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index b611420a8050..611a9d274363 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -342,8 +342,10 @@ int __init musb_platform_init(struct musb *musb, void *board_data)
342 342
343 usb_nop_xceiv_register(); 343 usb_nop_xceiv_register();
344 musb->xceiv = otg_get_transceiver(); 344 musb->xceiv = otg_get_transceiver();
345 if (!musb->xceiv) 345 if (!musb->xceiv) {
346 gpio_free(musb->config->gpio_vrsel);
346 return -ENODEV; 347 return -ENODEV;
348 }
347 349
348 if (ANOMALY_05000346) { 350 if (ANOMALY_05000346) {
349 bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value); 351 bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value);
@@ -394,8 +396,9 @@ int __init musb_platform_init(struct musb *musb, void *board_data)
394 396
395int musb_platform_exit(struct musb *musb) 397int musb_platform_exit(struct musb *musb)
396{ 398{
397
398 gpio_free(musb->config->gpio_vrsel); 399 gpio_free(musb->config->gpio_vrsel);
399 400
401 otg_put_transceiver(musb->xceiv);
402 usb_nop_xceiv_unregister();
400 return 0; 403 return 0;
401} 404}