public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] USB: Add empty functions in otg.h
@ 2010-01-05  8:46 Maulik Mankad
  2010-01-05 10:54 ` Felipe Balbi
  2010-01-15 19:10 ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Maulik Mankad @ 2010-01-05  8:46 UTC (permalink / raw)
  To: linux-usb
  Cc: linux-omap, Maulik Mankad, Tony Lindgren, Felipe Balbi,
	Greg Kroah-Hartman, Olof Johansson, Sergei Shtylyov,
	Gupta, Ajay Kumar

USB : Add empty functions in otg.h

Add empty functions for usb_nop_xceiv_register()
and usb_nop_xceiv_unregister() in otg.h so that 
these functions can be called even when 
CONFIG_NOP_USB_XCEIV is not enabled. 

It allows to remove ifdef's from board file.

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Gupta, Ajay Kumar <ajay.gupta@ti.com>
---
Index: felipe_musb/include/linux/usb/otg.h
===================================================================
--- felipe_musb.orig/include/linux/usb/otg.h
+++ felipe_musb/include/linux/usb/otg.h
@@ -110,9 +110,19 @@ struct otg_transceiver {
 /* for board-specific init logic */
 extern int otg_set_transceiver(struct otg_transceiver *);
 
+#if defined(CONFIG_NOP_USB_XCEIV)
 /* sometimes transceivers are accessed only through e.g. ULPI */
 extern void usb_nop_xceiv_register(void);
 extern void usb_nop_xceiv_unregister(void);
+#else
+static inline void usb_nop_xceiv_register(void)
+{
+}
+
+static inline void usb_nop_xceiv_unregister(void)
+{
+}
+#endif
 
 /* helpers for direct access thru low-level io interface */
 static inline int otg_io_read(struct otg_transceiver *otg, u32 reg)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-18 12:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-05  8:46 [PATCH v3 1/2] USB: Add empty functions in otg.h Maulik Mankad
2010-01-05 10:54 ` Felipe Balbi
2010-01-05 17:53   ` Olof Johansson
2010-01-08  5:56     ` Maulik
2010-01-15 19:10 ` Greg KH
2010-01-18 12:32   ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox