From: Greg KH <gregkh@linuxfoundation.org>
To: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH] staging: rtl8192u: r8192U_core: Fix compile issue when CONFIG_WIRELESS_EXT is not defined
Date: Sun, 25 Jan 2015 19:52:37 +0800 [thread overview]
Message-ID: <20150125115237.GA12221@kroah.com> (raw)
In-Reply-To: <1422126702-27357-1-git-send-email-mopsfelder@gmail.com>
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
prev parent reply other threads:[~2015-01-25 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 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=20150125115237.GA12221@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mopsfelder@gmail.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