]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: otg: use try_module_get in all usb_get_phy functions and add missing module_put
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 27 Feb 2013 14:11:13 +0000 (15:11 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 4 Mar 2013 07:33:30 +0000 (09:33 +0200)
commit1dd03d8a510dae402096b194385a1373100450dc
treefdb98b38bb816b090e36a66720abb0ec04a67802
parenta10840c9acbeca7aada3543823fdb59909342d96
usb: otg: use try_module_get in all usb_get_phy functions and add missing module_put

In patch "5d3c28b 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: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/otg/otg.c