lkml.org 
[lkml]   [2011]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 05/18] eeepc-wmi: return proper error code in eeepc_rfkill_set()
Date
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
drivers/platform/x86/eeepc-wmi.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index eb4c0ce..d823458 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -588,8 +588,14 @@ static int eeepc_rfkill_set(void *data, bool blocked)
{
int dev_id = (unsigned long)data;
u32 ctrl_param = !blocked;
+ acpi_status status;
+
+ status = eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
+
+ if (ACPI_FAILURE(status))
+ return -EIO;

- return eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
+ return 0;
}

static void eeepc_rfkill_query(struct rfkill *rfkill, void *data)
--
1.7.4.rc3


\
 
 \ /
  Last update: 2011-02-06 13:31    [W:0.126 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site