linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: drago01 <drago01@gmail.com>
Cc: "Linux Wireless" <linux-wireless@vger.kernel.org>,
	"Zhu, Yi" <yi.zhu@intel.com>,
	randy.dunlap@oracle.com,
	"John W. Linville" <linville@tuxdriver.com>,
	"Abhijeet Kolekar" <abhijeet.kolekar@intel.com>
Subject: Re: [PATCH v2] iwl3945: fix up rfkill kconfig and input
Date: Fri, 27 Jun 2008 00:45:49 +0200	[thread overview]
Message-ID: <200806270045.50169.IvDoorn@gmail.com> (raw)
In-Reply-To: <f6ca9fed0806261527q75df34d4scbe36e2f63cec275@mail.gmail.com>

On Friday 27 June 2008, drago01 wrote:
> On Fri, Jun 27, 2008 at 12:15 AM, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> >> diff --git a/drivers/net/wireless/iwlwifi/Kconfig
> >> b/drivers/net/wireless/iwlwifi/Kconfig
> >> index a382c00..3148a28 100644
> >> --- a/drivers/net/wireless/iwlwifi/Kconfig
> >> +++ b/drivers/net/wireless/iwlwifi/Kconfig
> >> @@ -105,6 +105,7 @@ config IWL3945
> >>       select IWLWIFI
> >>       select MAC80211_LEDS if IWL3945_LEDS
> >>       select LEDS_CLASS if IWL3945_LEDS
> >> +     select RFKILL_INPUT if (IWL3945_RFKILL && INPUT)
> >
> > That is a big no. Drivers should only use CONFIG_RFKILL and in no way
> > depend or select RFKILL_INPUT. RFKILL_INPUT is a decision for the user
> > and doesn't change anything for drivers.
> 
> v2 is attached it removed the CONFIG_RFKILL_INPUT stuff and made it
> depend on CONFIG_RFKILL.
> That means that the 4965 patch needs to be updated/fixed too.

Not sure if it should depend or select CONFIG_INPUT,
but the RFKILL dependencies are now correct.

Thanks,

Ivo

> ------
> This patch fixes the iwl3945 driver to depend on CONFIG_RFKILL and
> CONFIG_INPUT when RFKILL is used.
> It removes the dependency on CONFIG_IWLCORE and frees the input
> device on exit.
> 
> Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
> 
> diff --git a/drivers/net/wireless/iwlwifi/Kconfig
> b/drivers/net/wireless/iwlwifi/Kconfig
> index a382c00..c7fd8aa 100644
> --- a/drivers/net/wireless/iwlwifi/Kconfig
> +++ b/drivers/net/wireless/iwlwifi/Kconfig
> @@ -105,6 +105,8 @@ config IWL3945
>  	select IWLWIFI
>  	select MAC80211_LEDS if IWL3945_LEDS
>  	select LEDS_CLASS if IWL3945_LEDS
> +	select RFKILL if IWL3945_RFKILL
> +	select INPUT if IWL3945_RFKILL
>  	---help---
>  	  Select to build the driver supporting the:
> 
> @@ -127,6 +129,10 @@ config IWL3945
>  	  say M here and read <file:Documentation/kbuild/modules.txt>.  The
>  	  module will be called iwl3945.ko.
> 
> +config IWL3945_RFKILL
> +	boolean "Enable RF kill support in iwl3945 drivers"
> +	depends on IWL3945
> +
>  config IWL3945_SPECTRUM_MEASUREMENT
>  	bool "Enable Spectrum Measurement in iwl3945 drivers"
>  	depends on IWL3945
> diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h
> b/drivers/net/wireless/iwlwifi/iwl-3945.h
> index a774978..4df42ad 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-3945.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
> @@ -690,7 +690,7 @@ enum {
> 
>  #endif
> 
> -#ifdef CONFIG_IWLWIFI_RFKILL
> +#ifdef CONFIG_IWL3945_RFKILL
>  struct iwl3945_priv;
> 
>  struct iwl3945_rfkill_mngr {
> @@ -800,7 +800,7 @@ struct iwl3945_priv {
>  	struct iwl3945_init_alive_resp card_alive_init;
>  	struct iwl3945_alive_resp card_alive;
> 
> -#ifdef CONFIG_IWLWIFI_RFKILL
> +#ifdef CONFIG_IWL3945_RFKILL
>  	struct iwl3945_rfkill_mngr rfkill_mngr;
>  #endif
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index 43cb8ff..e12baaa 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -8282,7 +8282,7 @@ static int iwl3945_pci_resume(struct pci_dev *pdev)
>  #endif /* CONFIG_PM */
> 
>  /*************** RFKILL FUNCTIONS **********/
> -#ifdef CONFIG_IWLWIFI_RFKILL
> +#ifdef CONFIG_IWL3945_RFKILL
>  /* software rf-kill from user */
>  static int iwl3945_rfkill_soft_rf_kill(void *data, enum rfkill_state state)
>  {
> @@ -8391,8 +8391,11 @@ error:
>  void iwl3945_rfkill_unregister(struct iwl3945_priv *priv)
>  {
> 
> -	if (priv->rfkill_mngr.input_dev)
> +	if (priv->rfkill_mngr.input_dev) {
>  		input_unregister_device(priv->rfkill_mngr.input_dev);
> +		input_free_device(priv->rfkill_mngr.input_dev);
> +	}
> +
> 
>  	if (priv->rfkill_mngr.rfkill)
>  		rfkill_unregister(priv->rfkill_mngr.rfkill);
> 



  reply	other threads:[~2008-06-26 22:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26 21:55 [PATCH] iwl3945: fix up rfkill kconfig and input drago01
2008-06-26 22:15 ` Ivo van Doorn
2008-06-26 22:27   ` [PATCH v2] " drago01
2008-06-26 22:45     ` Ivo van Doorn [this message]
2008-06-26 22:56       ` Randy Dunlap
2008-06-27  9:21         ` Zhu Yi
2008-06-27 10:47           ` Fabien Crespel

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=200806270045.50169.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=abhijeet.kolekar@intel.com \
    --cc=drago01@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=randy.dunlap@oracle.com \
    --cc=yi.zhu@intel.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;
as well as URLs for NNTP newsgroup(s).