Message ID | 20200722170746.5222-7-alcooperx@gmail.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 5fc453d7de3d0c345812453823a3a56783c5f82c |
Headers | show |
Series | usb: bdc: Updates and fixes to the USB BDC driver | expand |
diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index 2c2f7aef7ba7..c1650247ea39 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_core.c +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c @@ -607,9 +607,14 @@ static int bdc_remove(struct platform_device *pdev) static int bdc_suspend(struct device *dev) { struct bdc *bdc = dev_get_drvdata(dev); + int ret; - clk_disable_unprepare(bdc->clk); - return 0; + /* Halt the controller */ + ret = bdc_stop(bdc); + if (!ret) + clk_disable_unprepare(bdc->clk); + + return ret; } static int bdc_resume(struct device *dev)