All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattia Dongili <malattia@linux.it>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, Mattia Dongili <malattia@linux.it>,
	Matthias Welwarsky <matze@welwarsky.de>,
	Matthew Garrett <mjg59@srcf.ucam.org>
Subject: [PATCH 6/6] sony-laptop: always try to unblock rfkill on load
Date: Sun, 12 Apr 2009 20:26:31 +0900	[thread overview]
Message-ID: <1239535591-15514-7-git-send-email-malattia@linux.it> (raw)
In-Reply-To: <1239535591-15514-6-git-send-email-malattia@linux.it>

This fixes an inconsistent behaviour when loading the driver with the
switch on or off. In the former case you would also need to soft unblock
the switch via the sysfs file entries to really disable rfkill, in the
latter you wouldn't.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Cc: Matthias Welwarsky <matze@welwarsky.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
---
 drivers/platform/x86/sony-laptop.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 419873a..9c0ce73 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1103,8 +1103,11 @@ static int sony_nc_setup_wifi_rfkill(struct acpi_device *device)
 	err = rfkill_register(sony_wifi_rfkill);
 	if (err)
 		rfkill_free(sony_wifi_rfkill);
-	else
+	else {
 		sony_rfkill_devices[SONY_WIFI] = sony_wifi_rfkill;
+		sony_nc_rfkill_set(sony_wifi_rfkill->data,
+				RFKILL_STATE_UNBLOCKED);
+	}
 	return err;
 }
 
@@ -1125,8 +1128,11 @@ static int sony_nc_setup_bluetooth_rfkill(struct acpi_device *device)
 	err = rfkill_register(sony_bluetooth_rfkill);
 	if (err)
 		rfkill_free(sony_bluetooth_rfkill);
-	else
+	else {
 		sony_rfkill_devices[SONY_BLUETOOTH] = sony_bluetooth_rfkill;
+		sony_nc_rfkill_set(sony_bluetooth_rfkill->data,
+				RFKILL_STATE_UNBLOCKED);
+	}
 	return err;
 }
 
@@ -1146,8 +1152,11 @@ static int sony_nc_setup_wwan_rfkill(struct acpi_device *device)
 	err = rfkill_register(sony_wwan_rfkill);
 	if (err)
 		rfkill_free(sony_wwan_rfkill);
-	else
+	else {
 		sony_rfkill_devices[SONY_WWAN] = sony_wwan_rfkill;
+		sony_nc_rfkill_set(sony_wwan_rfkill->data,
+				RFKILL_STATE_UNBLOCKED);
+	}
 	return err;
 }
 
@@ -1167,8 +1176,11 @@ static int sony_nc_setup_wimax_rfkill(struct acpi_device *device)
 	err = rfkill_register(sony_wimax_rfkill);
 	if (err)
 		rfkill_free(sony_wimax_rfkill);
-	else
+	else {
 		sony_rfkill_devices[SONY_WIMAX] = sony_wimax_rfkill;
+		sony_nc_rfkill_set(sony_wimax_rfkill->data,
+				RFKILL_STATE_UNBLOCKED);
+	}
 	return err;
 }
 
-- 
1.6.2.2


  reply	other threads:[~2009-04-12 11:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-12 11:26 [PATCH 0/6] sony-laptop fixes for 2.6.30-rc2 Mattia Dongili
2009-04-12 11:26 ` [PATCH 1/6] sony-laptop: Duplicate SNC 127 Event Fix Mattia Dongili
2009-04-12 11:26   ` [PATCH 2/6] sony-laptop: SNC 127 Initialization Fix Mattia Dongili
2009-04-12 11:26     ` [PATCH 3/6] sony-laptop: SNC input event 38 fix Mattia Dongili
2009-04-12 11:26       ` [PATCH 4/6] ec.c: Fix ACPI EC resume non-query interrupt message Mattia Dongili
2009-04-12 11:26         ` [PATCH 5/6] sony-laptop: fix bogus error message display on resume Mattia Dongili
2009-04-12 11:26           ` Mattia Dongili [this message]
2009-04-13 15:46             ` [PATCH 6/6] sony-laptop: always try to unblock rfkill on load Matthew Garrett
2009-04-18  5:16 ` [PATCH 0/6] sony-laptop fixes for 2.6.30-rc2 Len Brown

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=1239535591-15514-7-git-send-email-malattia@linux.it \
    --to=malattia@linux.it \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=matze@welwarsky.de \
    --cc=mjg59@srcf.ucam.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.