diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2012-02-13 06:24:20 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-27 08:41:52 -0500 |
commit | 6e13c6505cdff9766d5268ffb8c972c1a2f996e6 (patch) | |
tree | e5e08928aaecfae70f5b2b904df1a30551af08d4 /include | |
parent | 136ced891ad2762dfe5ba476103e82ea2b9aff41 (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')
-rw-r--r-- | include/linux/usb/otg.h | 30 |
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) | |||
192 | 192 | ||
193 | /* Context: can sleep */ | 193 | /* Context: can sleep */ |
194 | static inline int | 194 | static inline int |
195 | otg_start_hnp(struct usb_phy *x) | 195 | otg_start_hnp(struct usb_otg *otg) |
196 | { | 196 | { |
197 | if (x->otg && x->otg->start_hnp) | 197 | if (otg && otg->start_hnp) |
198 | return x->otg->start_hnp(x->otg); | 198 | return otg->start_hnp(otg); |
199 | 199 | ||
200 | return -ENOTSUPP; | 200 | return -ENOTSUPP; |
201 | } | 201 | } |
202 | 202 | ||
203 | /* Context: can sleep */ | 203 | /* Context: can sleep */ |
204 | static inline int | 204 | static inline int |
205 | otg_set_vbus(struct usb_phy *x, bool enabled) | 205 | otg_set_vbus(struct usb_otg *otg, bool enabled) |
206 | { | 206 | { |
207 | if (x->otg && x->otg->set_vbus) | 207 | if (otg && otg->set_vbus) |
208 | return x->otg->set_vbus(x->otg, enabled); | 208 | return otg->set_vbus(otg, enabled); |
209 | 209 | ||
210 | return -ENOTSUPP; | 210 | return -ENOTSUPP; |
211 | } | 211 | } |
212 | 212 | ||
213 | /* for HCDs */ | 213 | /* for HCDs */ |
214 | static inline int | 214 | static inline int |
215 | otg_set_host(struct usb_phy *x, struct usb_bus *host) | 215 | otg_set_host(struct usb_otg *otg, struct usb_bus *host) |
216 | { | 216 | { |
217 | if (x->otg && x->otg->set_host) | 217 | if (otg && otg->set_host) |
218 | return x->otg->set_host(x->otg, host); | 218 | return otg->set_host(otg, host); |
219 | 219 | ||
220 | return -ENOTSUPP; | 220 | return -ENOTSUPP; |
221 | } | 221 | } |
@@ -224,10 +224,10 @@ otg_set_host(struct usb_phy *x, struct usb_bus *host) | |||
224 | 224 | ||
225 | /* Context: can sleep */ | 225 | /* Context: can sleep */ |
226 | static inline int | 226 | static inline int |
227 | otg_set_peripheral(struct usb_phy *x, struct usb_gadget *periph) | 227 | otg_set_peripheral(struct usb_otg *otg, struct usb_gadget *periph) |
228 | { | 228 | { |
229 | if (x->otg && x->otg->set_peripheral) | 229 | if (otg && otg->set_peripheral) |
230 | return x->otg->set_peripheral(x->otg, periph); | 230 | return otg->set_peripheral(otg, periph); |
231 | 231 | ||
232 | return -ENOTSUPP; | 232 | return -ENOTSUPP; |
233 | } | 233 | } |
@@ -251,10 +251,10 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) | |||
251 | } | 251 | } |
252 | 252 | ||
253 | static inline int | 253 | static inline int |
254 | otg_start_srp(struct usb_phy *x) | 254 | otg_start_srp(struct usb_otg *otg) |
255 | { | 255 | { |
256 | if (x->otg && x->otg->start_srp) | 256 | if (otg && otg->start_srp) |
257 | return x->otg->start_srp(x->otg); | 257 | return otg->start_srp(otg); |
258 | 258 | ||
259 | return -ENOTSUPP; | 259 | return -ENOTSUPP; |
260 | } | 260 | } |