LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: r8192U_core: Fix compile issue when CONFIG_WIRELESS_EXT is not defined
@ 2015-01-24 19:11 Murilo Opsfelder Araujo
  2015-01-25 11:52 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Murilo Opsfelder Araujo @ 2015-01-24 19:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, Murilo Opsfelder Araujo

This patch gets rid of the following error when compiling r8192U_core.c
and CONFIG_WIRELESS_EXT is not defined:

drivers/staging/rtl8192u/r8192U_core.c: In function ‘rtl8192_usb_probe’:
drivers/staging/rtl8192u/r8192U_core.c:4697:5: error: ‘struct net_device’ has no member named ‘wireless_handlers’
  dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
     ^

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index e031a25..396a11f 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4694,7 +4694,9 @@ static int rtl8192_usb_probe(struct usb_interface *intf,
 
 	dev->netdev_ops = &rtl8192_netdev_ops;
 
+#ifdef CONFIG_WIRELESS_EXT
 	dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
+#endif
 
 	dev->type = ARPHRD_ETHER;
 
-- 
2.1.0


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

* Re: [PATCH] staging: rtl8192u: r8192U_core: Fix compile issue when CONFIG_WIRELESS_EXT is not defined
  2015-01-24 19:11 [PATCH] staging: rtl8192u: r8192U_core: Fix compile issue when CONFIG_WIRELESS_EXT is not defined Murilo Opsfelder Araujo
@ 2015-01-25 11:52 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-01-25 11:52 UTC (permalink / raw)
  To: Murilo Opsfelder Araujo; +Cc: linux-kernel, devel

On Sat, Jan 24, 2015 at 05:11:42PM -0200, Murilo Opsfelder Araujo wrote:
> This patch gets rid of the following error when compiling r8192U_core.c
> and CONFIG_WIRELESS_EXT is not defined:
> 
> drivers/staging/rtl8192u/r8192U_core.c: In function ‘rtl8192_usb_probe’:
> drivers/staging/rtl8192u/r8192U_core.c:4697:5: error: ‘struct net_device’ has no member named ‘wireless_handlers’
>   dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
>      ^
> 
> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index e031a25..396a11f 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -4694,7 +4694,9 @@ static int rtl8192_usb_probe(struct usb_interface *intf,
>  
>  	dev->netdev_ops = &rtl8192_netdev_ops;
>  
> +#ifdef CONFIG_WIRELESS_EXT
>  	dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
> +#endif

It's almost never correct to put a #ifdef in a .c file, so what is going
on here?  How do other drivers handle this in a more "proper" way?

Is this something new?  Should this driver just depend on this Kconfig
option?

I can't take this as-is, sorry.

greg k-h

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

end of thread, other threads:[~2015-01-25 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-24 19:11 [PATCH] staging: rtl8192u: r8192U_core: Fix compile issue when CONFIG_WIRELESS_EXT is not defined Murilo Opsfelder Araujo
2015-01-25 11:52 ` Greg KH

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