summaryrefslogtreecommitdiff
path: root/include/linux/usb/otg.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2012-02-13 13:24:20 +0200
committerFelipe Balbi <balbi@ti.com>2012-02-27 15:41:52 +0200
commit6e13c6505cdff9766d5268ffb8c972c1a2f996e6 (patch)
treee5e08928aaecfae70f5b2b904df1a30551af08d4 /include/linux/usb/otg.h
parent136ced891ad2762dfe5ba476103e82ea2b9aff41 (diff)
usb: otg: Convert all users to pass struct usb_otg for OTG functions
This changes the otg functions so that they receive struct otg instead of struct usb_phy as parameter and converts all users of these functions to pass the otg member of their usb_phy. Includes fixes to IMX code from Sascha Hauer. [ balbi@ti.com : fixed a compile warning on ehci-mv.c ] Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Acked-by: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb/otg.h')
-rw-r--r--include/linux/usb/otg.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index de89342098e4..f67810f8f21b 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -192,30 +192,30 @@ static inline const char *otg_state_string(enum usb_otg_state state)
/* Context: can sleep */
static inline int
-otg_start_hnp(struct usb_phy *x)
+otg_start_hnp(struct usb_otg *otg)
{
- if (x->otg && x->otg->start_hnp)
- return x->otg->start_hnp(x->otg);
+ if (otg && otg->start_hnp)
+ return otg->start_hnp(otg);
return -ENOTSUPP;
}
/* Context: can sleep */
static inline int
-otg_set_vbus(struct usb_phy *x, bool enabled)
+otg_set_vbus(struct usb_otg *otg, bool enabled)
{
- if (x->otg && x->otg->set_vbus)
- return x->otg->set_vbus(x->otg, enabled);
+ if (otg && otg->set_vbus)
+ return otg->set_vbus(otg, enabled);
return -ENOTSUPP;
}
/* for HCDs */
static inline int
-otg_set_host(struct usb_phy *x, struct usb_bus *host)
+otg_set_host(struct usb_otg *otg, struct usb_bus *host)
{
- if (x->otg && x->otg->set_host)
- return x->otg->set_host(x->otg, host);
+ if (otg && otg->set_host)
+ return otg->set_host(otg, host);
return -ENOTSUPP;
}
@@ -224,10 +224,10 @@ otg_set_host(struct usb_phy *x, struct usb_bus *host)
/* Context: can sleep */
static inline int
-otg_set_peripheral(struct usb_phy *x, struct usb_gadget *periph)
+otg_set_peripheral(struct usb_otg *otg, struct usb_gadget *periph)
{
- if (x->otg && x->otg->set_peripheral)
- return x->otg->set_peripheral(x->otg, periph);
+ if (otg && otg->set_peripheral)
+ return otg->set_peripheral(otg, periph);
return -ENOTSUPP;
}
@@ -251,10 +251,10 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend)
}
static inline int
-otg_start_srp(struct usb_phy *x)
+otg_start_srp(struct usb_otg *otg)
{
- if (x->otg && x->otg->start_srp)
- return x->otg->start_srp(x->otg);
+ if (otg && otg->start_srp)
+ return otg->start_srp(otg);
return -ENOTSUPP;
}