mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
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>
This commit is contained in:
parent
7893afc035
commit
748eee0986
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue