Re: USB: Add empty functions in otg.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
Cc: Tony Lindgren <tony@xxxxxxxxxxx>
Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
Acked-by: Olof Johansson <olof@xxxxxxxxx>
Cc: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Cc: Gupta, Ajay Kumar <ajay.gupta@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

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-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux