Skip to content
Commit 1dd03d8a authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Felipe Balbi
Browse files

usb: otg: use try_module_get in all usb_get_phy functions and add missing module_put

In patch "5d3c28b5

 usb: otg: add device tree support to otg library"
devm_usb_get_phy_by_phandle() was added. It uses try_module_get() to lock the
phy driver in memory. The corresponding module_put() is missing in that patch.

This patch adds try_module_get() to usb_get_phy() and usb_get_phy_dev().
Further the missing module_put() is added to usb_put_phy().

Tested-by: default avatarSteffen Trumtrar <s.trumtrar@pengutronix.de>
Reviewed-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a10840c9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment