All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] ARM : OMAP : Add empty function in header file
@ 2009-12-31 13:13 Maulik Mankad
  2009-12-31 19:34 ` Sergei Shtylyov
  2009-12-31 23:58 ` Felipe Balbi
  0 siblings, 2 replies; 3+ messages in thread
From: Maulik Mankad @ 2009-12-31 13:13 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-usb, Maulik Mankad, Tony Lindgren, Felipe Balbi,
	Greg Kroah-Hartman, Olof Johansson

ARM : OMAP : Add empty function in header file

This patch adds empty functions for usb_nop_xceiv_register()
and usb_nop_xceiv_unregister() 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>
---
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,14 @@ struct otg_transceiver {
 /* for board-specific init logic */
 extern int otg_set_transceiver(struct otg_transceiver *);
 
+#if defined(CONFIG_USB) || defined(CONFIG_USB_GADGET)
 /* sometimes transceivers are accessed only through e.g. ULPI */
 extern void usb_nop_xceiv_register(void);
 extern void usb_nop_xceiv_unregister(void);
+#else
+#define usb_nop_xceiv_register()	do {} while (0)
+#define usb_nop_xceiv_unregister()	do {} while (0)
+#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] 3+ messages in thread

* Re: [PATCH 2/2] ARM : OMAP : Add empty function in header file
  2009-12-31 13:13 [PATCH 2/2] ARM : OMAP : Add empty function in header file Maulik Mankad
@ 2009-12-31 19:34 ` Sergei Shtylyov
  2009-12-31 23:58 ` Felipe Balbi
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2009-12-31 19:34 UTC (permalink / raw)
  To: Maulik Mankad
  Cc: linux-omap, linux-usb, Tony Lindgren, Felipe Balbi,
	Greg Kroah-Hartman, Olof Johansson

Hello.

Maulik Mankad wrote:

> ARM : OMAP : Add empty function in header file
>
> This patch adds empty functions for usb_nop_xceiv_register()
> and usb_nop_xceiv_unregister() 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>
> ---
> 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,14 @@ struct otg_transceiver {
>  /* for board-specific init logic */
>  extern int otg_set_transceiver(struct otg_transceiver *);
>  
> +#if defined(CONFIG_USB) || defined(CONFIG_USB_GADGET)
>  /* sometimes transceivers are accessed only through e.g. ULPI */
>  extern void usb_nop_xceiv_register(void);
>  extern void usb_nop_xceiv_unregister(void);
> +#else
> +#define usb_nop_xceiv_register()	do {} while (0)
> +#define usb_nop_xceiv_unregister()	do {} while (0)
>   

   Inline functions are preferrable to macros.

WBR, Sergei



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

* Re: [PATCH 2/2] ARM : OMAP : Add empty function in header file
  2009-12-31 13:13 [PATCH 2/2] ARM : OMAP : Add empty function in header file Maulik Mankad
  2009-12-31 19:34 ` Sergei Shtylyov
@ 2009-12-31 23:58 ` Felipe Balbi
  1 sibling, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2009-12-31 23:58 UTC (permalink / raw)
  To: Maulik Mankad
  Cc: linux-omap, linux-usb, Tony Lindgren, Felipe Balbi,
	Greg Kroah-Hartman, Olof Johansson

Hi,

On Thu, 2009-12-31 at 18:43 +0530, Maulik Mankad wrote: 
> +#if defined(CONFIG_USB) || defined(CONFIG_USB_GADGET)

how about using CONFIG_USB_NOP_XCEIV

-- 
balbi


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

end of thread, other threads:[~2009-12-31 23:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-31 13:13 [PATCH 2/2] ARM : OMAP : Add empty function in header file Maulik Mankad
2009-12-31 19:34 ` Sergei Shtylyov
2009-12-31 23:58 ` Felipe Balbi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.