From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Maulik Mankad <x0082077@ti.com>
Cc: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org,
Tony Lindgren <tony@atomide.com>,
Felipe Balbi <felipe.balbi@nokia.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 2/2] ARM : OMAP : Add empty function in header file
Date: Thu, 31 Dec 2009 22:34:59 +0300 [thread overview]
Message-ID: <4B3CFCE3.2040206@ru.mvista.com> (raw)
In-Reply-To: <1262265214-16906-1-git-send-email-x0082077@ti.com>
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
next prev parent reply other threads:[~2009-12-31 19:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-12-31 23:58 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B3CFCE3.2040206@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=felipe.balbi@nokia.com \
--cc=gregkh@suse.de \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=olof@lixom.net \
--cc=tony@atomide.com \
--cc=x0082077@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.