public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Troy Moure <twmoure@szypr.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] acer-wmi: fix rfkill conversion
Date: Wed, 17 Jun 2009 13:15:34 +0200	[thread overview]
Message-ID: <1245237334.31171.0.camel@johannes.local> (raw)
In-Reply-To: <alpine.LFD.2.00.0906171135080.3376@troy-laptop>

[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]

On Wed, 2009-06-17 at 11:51 +0100, Troy Moure wrote:
> Commit 19d337dff95cbf76ed ("rfkill: rewrite") incorrectly reversed
> the meaning of 'state' in acer_rfkill_update() when it changed
> rfkill_force_state() to rfkill_set_sw_state().  Fix it.
> 
> Signed-off-by: Troy Moure <twmoure@szypr.net>
> ---
> This fixes the rfkill switch on my Acer laptop, which was behaving
> backwards (the state reported in the logs was the opposite of the
> state indicated by the LED).

Thanks. Looks like I made this mistake a few times.

johannes

>  drivers/platform/x86/acer-wmi.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> index 09a503e..be2fd6f 100644
> --- a/drivers/platform/x86/acer-wmi.c
> +++ b/drivers/platform/x86/acer-wmi.c
> @@ -958,12 +958,12 @@ static void acer_rfkill_update(struct work_struct *ignored)
>  
>  	status = get_u32(&state, ACER_CAP_WIRELESS);
>  	if (ACPI_SUCCESS(status))
> -		rfkill_set_sw_state(wireless_rfkill, !!state);
> +		rfkill_set_sw_state(wireless_rfkill, !state);
>  
>  	if (has_cap(ACER_CAP_BLUETOOTH)) {
>  		status = get_u32(&state, ACER_CAP_BLUETOOTH);
>  		if (ACPI_SUCCESS(status))
> -			rfkill_set_sw_state(bluetooth_rfkill, !!state);
> +			rfkill_set_sw_state(bluetooth_rfkill, !state);
>  	}
>  
>  	schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ));

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2009-06-17 11:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 10:51 [PATCH] acer-wmi: fix rfkill conversion Troy Moure
2009-06-17 11:15 ` Johannes Berg [this message]
2009-07-19  8:48 ` Alan Jenkins
2009-07-19  8:53   ` Johannes Berg

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=1245237334.31171.0.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=twmoure@szypr.net \
    /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