summaryrefslogtreecommitdiff
path: root/include/linux/usb/otg.h
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2010-09-27 16:17:18 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 21:21:57 +0400
commit748eee0986f0d51c7bc39f194d515a8d8248ebdd (patch)
tree6e485a4bde88c0f8f078a23c0e6e1e9b1cf1e858 /include/linux/usb/otg.h
parent7893afc035590383a14b176c1497cba984276ef4 (diff)
downloadlinux-748eee0986f0d51c7bc39f194d515a8d8248ebdd.tar.xz
USB: Add more empty functions in otg.h
Add empty functions for get/put transceiver functions too, so that drivers that optionally use them can call them without worrying that they might not exist, eliminating ifdefs. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb/otg.h')
-rw-r--r--include/linux/usb/otg.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 545cba73ccaf..0a5b3711e502 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -164,8 +164,19 @@ otg_shutdown(struct otg_transceiver *otg)
}
/* for usb host and peripheral controller drivers */
+#ifdef CONFIG_USB_OTG_UTILS
extern struct otg_transceiver *otg_get_transceiver(void);
extern void otg_put_transceiver(struct otg_transceiver *);
+#else
+static inline struct otg_transceiver *otg_get_transceiver(void)
+{
+ return NULL;
+}
+
+static inline void otg_put_transceiver(struct otg_transceiver *x)
+{
+}
+#endif
/* Context: can sleep */
static inline int