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

* Re: [PATCH v3 1/2] USB: Add empty functions in otg.h
  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-15 19:10 ` Greg KH
  1 sibling, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2010-01-05 10:54 UTC (permalink / raw)
  To: ext Maulik Mankad
  Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	Tony Lindgren, Balbi Felipe (Nokia-D/Helsinki),
	Greg Kroah-Hartman, Olof Johansson, Sergei Shtylyov,
	Gupta, Ajay Kumar

On Tue, Jan 05, 2010 at 09:46:58AM +0100, ext 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>
>Cc: Felipe Balbi <felipe.balbi@nokia.com>

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

Now this patch looks ok.

-- 
balbi

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

* Re: [PATCH v3 1/2] USB: Add empty functions in otg.h
  2010-01-05 10:54 ` Felipe Balbi
@ 2010-01-05 17:53   ` Olof Johansson
  2010-01-08  5:56     ` Maulik
  0 siblings, 1 reply; 6+ messages in thread
From: Olof Johansson @ 2010-01-05 17:53 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: ext Maulik Mankad, linux-usb@vger.kernel.org,
	linux-omap@vger.kernel.org, Tony Lindgren, Greg Kroah-Hartman,
	Sergei Shtylyov, Gupta, Ajay Kumar

On Tue, Jan 05, 2010 at 12:54:50PM +0200, Felipe Balbi wrote:
> On Tue, Jan 05, 2010 at 09:46:58AM +0100, ext 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>
>> Cc: Felipe Balbi <felipe.balbi@nokia.com>
>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
>
> Now this patch looks ok.

Don't you mean Acked-by?

Anyway, also:

Acked-by: Olof Johansson <olof@lixom.net>


-Olof

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

* RE: [PATCH v3 1/2] USB: Add empty functions in otg.h
  2010-01-05 17:53   ` Olof Johansson
@ 2010-01-08  5:56     ` Maulik
  0 siblings, 0 replies; 6+ messages in thread
From: Maulik @ 2010-01-08  5:56 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: linux-usb, linux-omap, 'Olof Johansson',
	'Felipe Balbi', 'Tony Lindgren'

Greg,

Are you going to include this patch in your queue?

Thanks,
Maulik

-----Original Message-----
From: Olof Johansson [mailto:olof@lixom.net] 
Sent: Tuesday, January 05, 2010 11:23 PM
To: Felipe Balbi
Cc: ext Maulik Mankad; linux-usb@vger.kernel.org;
linux-omap@vger.kernel.org; Tony Lindgren; Greg Kroah-Hartman; Sergei
Shtylyov; Gupta, Ajay Kumar
Subject: Re: [PATCH v3 1/2] USB: Add empty functions in otg.h

On Tue, Jan 05, 2010 at 12:54:50PM +0200, Felipe Balbi wrote:
> On Tue, Jan 05, 2010 at 09:46:58AM +0100, ext 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>
>> Cc: Felipe Balbi <felipe.balbi@nokia.com>
>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
>
> Now this patch looks ok.

Don't you mean Acked-by?

Anyway, also:

Acked-by: Olof Johansson <olof@lixom.net>


-Olof


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

* Re: USB: Add empty functions in otg.h
  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-15 19:10 ` Greg KH
  2010-01-18 12:32   ` Felipe Balbi
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2010-01-15 19:10 UTC (permalink / raw)
  To: Maulik Mankad
  Cc: linux-usb, linux-omap, Tony Lindgren, Felipe Balbi,
	Greg Kroah-Hartman, Olof Johansson, Sergei Shtylyov,
	Gupta, Ajay Kumar

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...

thanks,

greg k-h
--
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

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

* Re: USB: Add empty functions in otg.h
  2010-01-15 19:10 ` Greg KH
@ 2010-01-18 12:32   ` Felipe Balbi
  0 siblings, 0 replies; 6+ messages in thread
From: Felipe Balbi @ 2010-01-18 12:32 UTC (permalink / raw)
  To: ext Greg KH
  Cc: Maulik Mankad, linux-usb@vger.kernel.org,
	linux-omap@vger.kernel.org, Tony Lindgren,
	Balbi Felipe (Nokia-D/Helsinki), Greg Kroah-Hartman,
	Olof Johansson, Sergei Shtylyov, Gupta, Ajay Kumar

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

^ 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