Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Grazvydas Ignotas and committed by
Greg Kroah-Hartman
748eee09 7893afc0

+11
+11
include/linux/usb/otg.h
··· 164 164 } 165 165 166 166 /* for usb host and peripheral controller drivers */ 167 + #ifdef CONFIG_USB_OTG_UTILS 167 168 extern struct otg_transceiver *otg_get_transceiver(void); 168 169 extern void otg_put_transceiver(struct otg_transceiver *); 170 + #else 171 + static inline struct otg_transceiver *otg_get_transceiver(void) 172 + { 173 + return NULL; 174 + } 175 + 176 + static inline void otg_put_transceiver(struct otg_transceiver *x) 177 + { 178 + } 179 + #endif 169 180 170 181 /* Context: can sleep */ 171 182 static inline int