linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation
@ 2013-10-23  9:55 Chen Gang
  2013-11-04  9:32 ` Chen Gang
  2013-11-14 18:37 ` Tony Lindgren
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Gang @ 2013-10-23  9:55 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Greg KH, linux-usb, linux-kernel, linux-arm-kernel, Will Deacon,
	Catalin Marinas, Russell King - ARM Linux

When CONFIG_NOP_USB_XCEIV is as 'm', usb_nop_xceiv_register() will be
exported when the related module is loaded. So for built-in source
code, still need use the empty one.

Or it will can not pass compiling, the related error (for arm, with 
allmodconfig):

  arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init':
  arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to `usb_nop_xceiv_register'


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 include/linux/usb/usb_phy_gen_xceiv.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/usb/usb_phy_gen_xceiv.h b/include/linux/usb/usb_phy_gen_xceiv.h
index f9a7e7b..8515958 100644
--- a/include/linux/usb/usb_phy_gen_xceiv.h
+++ b/include/linux/usb/usb_phy_gen_xceiv.h
@@ -12,7 +12,8 @@ struct usb_phy_gen_xceiv_platform_data {
 	unsigned int needs_reset:1;
 };
 
-#if IS_ENABLED(CONFIG_NOP_USB_XCEIV)
+#if IS_BUILTIN(CONFIG_NOP_USB_XCEIV) || \
+	(IS_MODULE(CONFIG_NOP_USB_XCEIV) && defined(MODULE))
 /* sometimes transceivers are accessed only through e.g. ULPI */
 extern void usb_nop_xceiv_register(void);
 extern void usb_nop_xceiv_unregister(void);
-- 
1.7.7.6

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

* Re: [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation
  2013-10-23  9:55 [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation Chen Gang
@ 2013-11-04  9:32 ` Chen Gang
  2013-11-14 18:37 ` Tony Lindgren
  1 sibling, 0 replies; 4+ messages in thread
From: Chen Gang @ 2013-11-04  9:32 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Greg KH, linux-usb, linux-kernel, linux-arm-kernel, Will Deacon,
	Catalin Marinas, Russell King - ARM Linux

Hello Maintainers:

Please help check this patch, when you have time.

Thanks.

On 10/23/2013 05:55 PM, Chen Gang wrote:
> When CONFIG_NOP_USB_XCEIV is as 'm', usb_nop_xceiv_register() will be
> exported when the related module is loaded. So for built-in source
> code, still need use the empty one.
> 
> Or it will can not pass compiling, the related error (for arm, with 
> allmodconfig):
> 
>   arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init':
>   arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to `usb_nop_xceiv_register'
> 
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  include/linux/usb/usb_phy_gen_xceiv.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/usb/usb_phy_gen_xceiv.h b/include/linux/usb/usb_phy_gen_xceiv.h
> index f9a7e7b..8515958 100644
> --- a/include/linux/usb/usb_phy_gen_xceiv.h
> +++ b/include/linux/usb/usb_phy_gen_xceiv.h
> @@ -12,7 +12,8 @@ struct usb_phy_gen_xceiv_platform_data {
>  	unsigned int needs_reset:1;
>  };
>  
> -#if IS_ENABLED(CONFIG_NOP_USB_XCEIV)
> +#if IS_BUILTIN(CONFIG_NOP_USB_XCEIV) || \
> +	(IS_MODULE(CONFIG_NOP_USB_XCEIV) && defined(MODULE))
>  /* sometimes transceivers are accessed only through e.g. ULPI */
>  extern void usb_nop_xceiv_register(void);
>  extern void usb_nop_xceiv_unregister(void);
> 


-- 
Chen Gang

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

* Re: [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation
  2013-10-23  9:55 [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation Chen Gang
  2013-11-04  9:32 ` Chen Gang
@ 2013-11-14 18:37 ` Tony Lindgren
  2013-11-15  1:36   ` Chen Gang
  1 sibling, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2013-11-14 18:37 UTC (permalink / raw)
  To: Chen Gang
  Cc: Greg KH, linux-usb, linux-kernel, linux-arm-kernel, Will Deacon,
	Catalin Marinas, Russell King - ARM Linux, Felipe Balbi

* Chen Gang <gang.chen@asianux.com> [131023 02:57]:
> When CONFIG_NOP_USB_XCEIV is as 'm', usb_nop_xceiv_register() will be
> exported when the related module is loaded. So for built-in source
> code, still need use the empty one.
> 
> Or it will can not pass compiling, the related error (for arm, with 
> allmodconfig):
> 
>   arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init':
>   arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to `usb_nop_xceiv_register'
> 
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>

Added Felipe to cc, he should probably deal with this one.

Regards,

Tony

> ---
>  include/linux/usb/usb_phy_gen_xceiv.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/usb/usb_phy_gen_xceiv.h b/include/linux/usb/usb_phy_gen_xceiv.h
> index f9a7e7b..8515958 100644
> --- a/include/linux/usb/usb_phy_gen_xceiv.h
> +++ b/include/linux/usb/usb_phy_gen_xceiv.h
> @@ -12,7 +12,8 @@ struct usb_phy_gen_xceiv_platform_data {
>  	unsigned int needs_reset:1;
>  };
>  
> -#if IS_ENABLED(CONFIG_NOP_USB_XCEIV)
> +#if IS_BUILTIN(CONFIG_NOP_USB_XCEIV) || \
> +	(IS_MODULE(CONFIG_NOP_USB_XCEIV) && defined(MODULE))
>  /* sometimes transceivers are accessed only through e.g. ULPI */
>  extern void usb_nop_xceiv_register(void);
>  extern void usb_nop_xceiv_unregister(void);
> -- 
> 1.7.7.6

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

* Re: [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation
  2013-11-14 18:37 ` Tony Lindgren
@ 2013-11-15  1:36   ` Chen Gang
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2013-11-15  1:36 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Greg KH, linux-usb, linux-kernel, linux-arm-kernel, Will Deacon,
	Catalin Marinas, Russell King - ARM Linux, Felipe Balbi

On 11/15/2013 02:37 AM, Tony Lindgren wrote:
> * Chen Gang <gang.chen@asianux.com> [131023 02:57]:
>> When CONFIG_NOP_USB_XCEIV is as 'm', usb_nop_xceiv_register() will be
>> exported when the related module is loaded. So for built-in source
>> code, still need use the empty one.
>>
>> Or it will can not pass compiling, the related error (for arm, with 
>> allmodconfig):
>>
>>   arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init':
>>   arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to `usb_nop_xceiv_register'
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> 
> Added Felipe to cc, he should probably deal with this one.
> 

OK, thank you very much.

And welcome Felipe to help checking, when he has time.

:-)

> Regards,
> 
> Tony
> 
>> ---
>>  include/linux/usb/usb_phy_gen_xceiv.h |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/usb/usb_phy_gen_xceiv.h b/include/linux/usb/usb_phy_gen_xceiv.h
>> index f9a7e7b..8515958 100644
>> --- a/include/linux/usb/usb_phy_gen_xceiv.h
>> +++ b/include/linux/usb/usb_phy_gen_xceiv.h
>> @@ -12,7 +12,8 @@ struct usb_phy_gen_xceiv_platform_data {
>>  	unsigned int needs_reset:1;
>>  };
>>  
>> -#if IS_ENABLED(CONFIG_NOP_USB_XCEIV)
>> +#if IS_BUILTIN(CONFIG_NOP_USB_XCEIV) || \
>> +	(IS_MODULE(CONFIG_NOP_USB_XCEIV) && defined(MODULE))
>>  /* sometimes transceivers are accessed only through e.g. ULPI */
>>  extern void usb_nop_xceiv_register(void);
>>  extern void usb_nop_xceiv_unregister(void);
>> -- 
>> 1.7.7.6
> 
> 


-- 
Chen Gang

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

end of thread, other threads:[~2013-11-15  1:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23  9:55 [PATCH] include/linux/usb/usb_phy_gen_xceiv.h: check built-in or module for swithing usb_nop_xceiv_register() implementation Chen Gang
2013-11-04  9:32 ` Chen Gang
2013-11-14 18:37 ` Tony Lindgren
2013-11-15  1:36   ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).