aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-12-15 02:27:39 -0500
committerMatthew Garrett <mjg@redhat.com>2012-03-20 12:02:19 -0400
commit20db88e32d139e7646c61b23b027a7471f343fae (patch)
treea50b80f3b81069673cce95c10709e020e490044f /drivers/platform
parenta2d5dd24af1308d35329d78e74a1a3a94a1c1344 (diff)
samsung-laptop: fix seclinux rfkill and us it as fallback
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/samsung-laptop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 5047642d1662..7d7109fdbd63 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 = {
541 541
542static int seclinux_rfkill_set(void *data, bool blocked) 542static int seclinux_rfkill_set(void *data, bool blocked)
543{ 543{
544 struct samsung_laptop *samsung = data; 544 struct samsung_rfkill *srfkill = data;
545 struct samsung_laptop *samsung = srfkill->samsung;
545 const struct sabi_commands *commands = &samsung->config->commands; 546 const struct sabi_commands *commands = &samsung->config->commands;
546 547
547 return sabi_set_commandb(samsung, commands->set_wireless_button, 548 return sabi_set_commandb(samsung, commands->set_wireless_button,
@@ -889,8 +890,13 @@ static int __init samsung_rfkill_init_swsmi(struct samsung_laptop *samsung)
889 int ret; 890 int ret;
890 891
891 ret = swsmi_wireless_status(samsung, &data); 892 ret = swsmi_wireless_status(samsung, &data);
892 if (ret) 893 if (ret) {
894 /* Some swsmi laptops use the old seclinux way to control
895 * wireless devices */
896 if (ret == -EINVAL)
897 ret = samsung_rfkill_init_seclinux(samsung);
893 return ret; 898 return ret;
899 }
894 900
895 /* 0x02 seems to mean that the device is no present/available */ 901 /* 0x02 seems to mean that the device is no present/available */
896 902