From: Grazvydas Ignotas Date: Mon, 27 Sep 2010 12:17:18 +0000 (+0300) Subject: USB: Add more empty functions in otg.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=748eee0986f0d51c7bc39f194d515a8d8248ebdd;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 545cba73cca..0a5b3711e50 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