mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
USB: otg: add otg_put_transceiver()
As Russell King points out, calling put_device(otg_transceiver->dev) directly in driver cleanup paths makes assumptions about otg_transceiver internals. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
6084f1bf0c
commit
68144e0cc9
3 changed files with 9 additions and 2 deletions
|
|
@ -3006,7 +3006,7 @@ cleanup1:
|
|||
|
||||
cleanup0:
|
||||
if (xceiv)
|
||||
put_device(xceiv->dev);
|
||||
otg_put_transceiver(xceiv);
|
||||
|
||||
if (cpu_is_omap16xx() || cpu_is_omap24xx()) {
|
||||
clk_disable(hhc_clk);
|
||||
|
|
@ -3034,7 +3034,7 @@ static int __exit omap_udc_remove(struct platform_device *pdev)
|
|||
|
||||
pullup_disable(udc);
|
||||
if (udc->transceiver) {
|
||||
put_device(udc->transceiver->dev);
|
||||
otg_put_transceiver(udc->transceiver);
|
||||
udc->transceiver = NULL;
|
||||
}
|
||||
omap_writew(0, UDC_SYSCON1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue