public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@nokia.com>
To: ext Greg KH <greg@kroah.com>
Cc: Maulik Mankad <x0082077@ti.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	"Balbi Felipe (Nokia-D/Helsinki)" <felipe.balbi@nokia.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Olof Johansson <olof@lixom.net>,
	Sergei Shtylyov <sshtylyov@ru.mvista.com>,
	"Gupta, Ajay Kumar" <ajay.gupta@ti.com>
Subject: Re: USB: Add empty functions in otg.h
Date: Mon, 18 Jan 2010 14:32:47 +0200	[thread overview]
Message-ID: <20100118123247.GB4082@nokia.com> (raw)
In-Reply-To: <20100115191014.GA24694@kroah.com>

On Fri, Jan 15, 2010 at 08:10:14PM +0100, ext Greg KH wrote:
>On Tue, Jan 05, 2010 at 02:16:58PM +0530, Maulik Mankad wrote:
>>
>> 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>
>> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
>> Acked-by: Olof Johansson <olof@lixom.net>
>> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>> Cc: Gupta, Ajay Kumar <ajay.gupta@ti.com>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
>Oops, no, I'm rejecting this, as it breaks the build:
>  CC [M]  drivers/usb/otg/nop-usb-xceiv.o
>drivers/usb/otg/nop-usb-xceiv.c:41: error: redefinition of ‘usb_nop_xceiv_register’
>include/linux/usb/otg.h:132: error: previous definition of ‘usb_nop_xceiv_register’ was here
>drivers/usb/otg/nop-usb-xceiv.c:53: error: redefinition of ‘usb_nop_xceiv_unregister’
>include/linux/usb/otg.h:136: error: previous definition of ‘usb_nop_xceiv_unregister’ was here
>make[2]: *** [drivers/usb/otg/nop-usb-xceiv.o] Error 1
>make[1]: *** [drivers/usb/otg] Error 2
>make[1]: *** Waiting for unfinished jobs....
>
>Doesn't anyone build their patches anymore?  Kids these days...

Maulik, you have to handle the case where the driver is build as a 
dynamically linked module, so:

#if defined(CONFIG_USB_NOP_XCEIV) || defined(CONFIG_USB_NOP_XCEIV_MODULE)

something like that.

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-01-18 12:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20100118123247.GB4082@nokia.com \
    --to=felipe.balbi@nokia.com \
    --cc=ajay.gupta@ti.com \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sshtylyov@ru.mvista.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox