diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2012-02-13 13:24:04 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-13 13:35:06 +0200 |
commit | 7a8a3a9bec7432eedcb32b54a3940d0593246060 (patch) | |
tree | 6b1e604271f9f733d5414d1f3e54d53c67a2feaa /drivers/usb/otg/otg.c | |
parent | de07e18c00c403d5076a5a697d83fe3ced73bc30 (diff) | |
download | talos-op-linux-7a8a3a9bec7432eedcb32b54a3940d0593246060.tar.gz talos-op-linux-7a8a3a9bec7432eedcb32b54a3940d0593246060.zip |
usb: otg: Separate otg members from usb_phy
Introducing struct otg and collecting otg specific members
to it from struct usb_phy. There are no changes to
struct usb_phy at this stage. This also renames
transceiver specific functions, and offers aliases for the
old otg ones.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/otg/otg.c')
-rw-r--r-- | drivers/usb/otg/otg.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c index 56c0f1781d8c..801e597a1541 100644 --- a/drivers/usb/otg/otg.c +++ b/drivers/usb/otg/otg.c @@ -15,56 +15,56 @@ #include <linux/usb/otg.h> -static struct usb_phy *xceiv; +static struct usb_phy *phy; /** - * otg_get_transceiver - find the (single) OTG transceiver + * usb_get_transceiver - find the (single) USB transceiver * * Returns the transceiver driver, after getting a refcount to it; or * null if there is no such transceiver. The caller is responsible for - * calling otg_put_transceiver() to release that count. + * calling usb_put_transceiver() to release that count. * * For use by USB host and peripheral drivers. */ -struct usb_phy *otg_get_transceiver(void) +struct usb_phy *usb_get_transceiver(void) { - if (xceiv) - get_device(xceiv->dev); - return xceiv; + if (phy) + get_device(phy->dev); + return phy; } -EXPORT_SYMBOL(otg_get_transceiver); +EXPORT_SYMBOL(usb_get_transceiver); /** - * otg_put_transceiver - release the (single) OTG transceiver - * @x: the transceiver returned by otg_get_transceiver() + * usb_put_transceiver - release the (single) USB transceiver + * @x: the transceiver returned by usb_get_transceiver() * - * Releases a refcount the caller received from otg_get_transceiver(). + * Releases a refcount the caller received from usb_get_transceiver(). * * For use by USB host and peripheral drivers. */ -void otg_put_transceiver(struct usb_phy *x) +void usb_put_transceiver(struct usb_phy *x) { if (x) put_device(x->dev); } -EXPORT_SYMBOL(otg_put_transceiver); +EXPORT_SYMBOL(usb_put_transceiver); /** - * otg_set_transceiver - declare the (single) OTG transceiver - * @x: the USB OTG transceiver to be used; or NULL + * usb_set_transceiver - declare the (single) USB transceiver + * @x: the USB transceiver to be used; or NULL * * This call is exclusively for use by transceiver drivers, which * coordinate the activities of drivers for host and peripheral * controllers, and in some cases for VBUS current regulation. */ -int otg_set_transceiver(struct usb_phy *x) +int usb_set_transceiver(struct usb_phy *x) { - if (xceiv && x) + if (phy && x) return -EBUSY; - xceiv = x; + phy = x; return 0; } -EXPORT_SYMBOL(otg_set_transceiver); +EXPORT_SYMBOL(usb_set_transceiver); const char *otg_state_string(enum usb_otg_state state) { |