summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@bitmer.com>2012-05-13 21:10:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 08:49:50 -0700
commitfee8bc1c8ebec694650795b7c5b2fc98ead291db (patch)
tree2bfed6358474c7ca8e77b3ae80943ac06c353ca5 /drivers
parentbebc56d58dc780539777d2b1ca80df5566e2ad87 (diff)
downloadlinux-fee8bc1c8ebec694650795b7c5b2fc98ead291db.tar.bz2
USB: ehci-fsl: 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 ehci->transceiver is allocated with usb_get_transceiver. While at there remove one extra ehci->transceiver test as the code block has already tested it. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-fsl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 34acfcee7405..43362577b54a 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -150,8 +150,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
retval = otg_set_host(ehci->transceiver->otg,
&ehci_to_hcd(ehci)->self);
if (retval) {
- if (ehci->transceiver)
- put_device(ehci->transceiver->dev);
+ usb_put_transceiver(ehci->transceiver);
goto err4;
}
} else {
@@ -195,7 +194,7 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
if (ehci->transceiver) {
otg_set_host(ehci->transceiver->otg, NULL);
- put_device(ehci->transceiver->dev);
+ usb_put_transceiver(ehci->transceiver);
}
usb_remove_hcd(hcd);