[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1323934059-1221-10-git-send-email-corentincj@iksaif.net>
Date: Thu, 15 Dec 2011 08:27:39 +0100
From: Corentin Chary <corentincj@...aif.net>
To: Matthew Garrett <mjg@...hat.com>
Cc: Corentin Chary <corentincj@...aif.net>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 9/9] samsung-laptop: fix seclinux rfkill and us it as fallback
Signed-off-by: Corentin Chary <corentincj@...aif.net>
---
drivers/platform/x86/samsung-laptop.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 573e94b..dae1244 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -541,7 +541,8 @@ static const struct backlight_ops backlight_ops = {
static int seclinux_rfkill_set(void *data, bool blocked)
{
- struct samsung_laptop *samsung = data;
+ struct samsung_rfkill *srfkill = data;
+ struct samsung_laptop *samsung = srfkill->samsung;
const struct sabi_commands *commands = &samsung->config->commands;
return sabi_set_commandb(samsung, commands->set_wireless_button,
@@ -889,8 +890,13 @@ static int __init samsung_rfkill_init_swsmi(struct samsung_laptop *samsung)
int ret;
ret = swsmi_wireless_status(samsung, &data);
- if (ret)
+ if (ret) {
+ /* Some swsmi laptops use the old seclinux way to control
+ * wireless devices */
+ if (ret == -EINVAL)
+ ret = samsung_rfkill_init_seclinux(samsung);
return ret;
+ }
/* 0x02 seems to mean that the device is no present/available */
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists