diff options
Diffstat (limited to 'include/linux/usb')
| -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 | } |
