diff options
author | Jarkko Nikula <jarkko.nikula@bitmer.com> | 2012-05-13 14:10:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-14 11:49:50 -0400 |
commit | 0686a1fab07ecd1ec42e7bc6b0dd2f567378da30 (patch) | |
tree | 12c8afb730f316d454ba9132beeed43a9e12f9a8 /drivers/usb/host/ohci-omap.c | |
parent | fee8bc1c8ebec694650795b7c5b2fc98ead291db (diff) |
USB: ohci-omap: Use usb_put_transceiver instead of put_device
Currently usb_put_transceiver calls put_device so this is a no-op but it
is better to keep API usage consistent as ohci->transceiver is allocated
with usb_get_transceiver.
While at there remove one extra ohci->transceiver test as the code block
has already tested it.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-omap.c')
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 96451e41ee8a..74b53203239e 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -217,8 +217,7 @@ static int ohci_omap_init(struct usb_hcd *hcd) | |||
217 | dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n", | 217 | dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n", |
218 | ohci->transceiver->label, status); | 218 | ohci->transceiver->label, status); |
219 | if (status) { | 219 | if (status) { |
220 | if (ohci->transceiver) | 220 | usb_put_transceiver(ohci->transceiver); |
221 | put_device(ohci->transceiver->dev); | ||
222 | return status; | 221 | return status; |
223 | } | 222 | } |
224 | } else { | 223 | } else { |
@@ -405,7 +404,7 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) | |||
405 | usb_remove_hcd(hcd); | 404 | usb_remove_hcd(hcd); |
406 | if (ohci->transceiver) { | 405 | if (ohci->transceiver) { |
407 | (void) otg_set_host(ohci->transceiver->otg, 0); | 406 | (void) otg_set_host(ohci->transceiver->otg, 0); |
408 | put_device(ohci->transceiver->dev); | 407 | usb_put_transceiver(ohci->transceiver); |
409 | } | 408 | } |
410 | if (machine_is_omap_osk()) | 409 | if (machine_is_omap_osk()) |
411 | gpio_free(9); | 410 | gpio_free(9); |