Skip to content

Commit

Permalink
USB: Add more empty functions in otg.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Grazvydas Ignotas authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 7893afc commit 748eee0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/linux/usb/otg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 748eee0

Please sign in to comment.