diff options
author | Anatolij Gustschin <agust@denx.de> | 2011-05-05 06:11:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-06 21:16:39 -0400 |
commit | 3df004532582d0cc721da0df28311bcedd639724 (patch) | |
tree | d9ee3de5a34e5a1dcfc4a67043336ddd7cbe1664 /include | |
parent | 9be0392989306361d4a63a06a8ee281efbead548 (diff) |
usb: fix building musb drivers
Commit 3dacdf11 "usb: factor out state_string() on otg drivers"
broke building musb drivers since there is already another
otg_state_string() function in musb drivers, but with different
prototype. Fix musb drivers to use common otg_state_string(), too.
Also provide a nop for otg_state_string() if CONFIG_USB_OTG_UTILS
is not defined.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/otg.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index bc84858b3a4d..d87f44f5b04e 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -168,6 +168,7 @@ otg_shutdown(struct otg_transceiver *otg) | |||
168 | #ifdef CONFIG_USB_OTG_UTILS | 168 | #ifdef CONFIG_USB_OTG_UTILS |
169 | extern struct otg_transceiver *otg_get_transceiver(void); | 169 | extern struct otg_transceiver *otg_get_transceiver(void); |
170 | extern void otg_put_transceiver(struct otg_transceiver *); | 170 | extern void otg_put_transceiver(struct otg_transceiver *); |
171 | extern const char *otg_state_string(enum usb_otg_state state); | ||
171 | #else | 172 | #else |
172 | static inline struct otg_transceiver *otg_get_transceiver(void) | 173 | static inline struct otg_transceiver *otg_get_transceiver(void) |
173 | { | 174 | { |
@@ -177,6 +178,11 @@ static inline struct otg_transceiver *otg_get_transceiver(void) | |||
177 | static inline void otg_put_transceiver(struct otg_transceiver *x) | 178 | static inline void otg_put_transceiver(struct otg_transceiver *x) |
178 | { | 179 | { |
179 | } | 180 | } |
181 | |||
182 | static inline const char *otg_state_string(enum usb_otg_state state) | ||
183 | { | ||
184 | return NULL; | ||
185 | } | ||
180 | #endif | 186 | #endif |
181 | 187 | ||
182 | /* Context: can sleep */ | 188 | /* Context: can sleep */ |
@@ -246,6 +252,5 @@ otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb) | |||
246 | 252 | ||
247 | /* for OTG controller drivers (and maybe other stuff) */ | 253 | /* for OTG controller drivers (and maybe other stuff) */ |
248 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); | 254 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); |
249 | extern const char *otg_state_string(enum usb_otg_state state); | ||
250 | 255 | ||
251 | #endif /* __LINUX_USB_OTG_H */ | 256 | #endif /* __LINUX_USB_OTG_H */ |