Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227856
b: refs/heads/master
c: 698e164
h: refs/heads/master
v: v3
  • Loading branch information
Herton Ronaldo Krzesinski authored and Matthew Garrett committed Jan 7, 2011
1 parent 7f1d04e commit 6ee6206
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58f6425eb92f54943878b0b3f9c1e51f99c2cb72
refs/heads/master: 698e1641a37f833dd26ee2fde5eed426cd97880b
16 changes: 9 additions & 7 deletions trunk/drivers/platform/x86/classmate-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,18 +522,20 @@ static int cmpc_rfkill_block(void *data, bool blocked)
acpi_status status;
acpi_handle handle;
unsigned long long state;
bool is_blocked;

handle = data;
status = cmpc_get_rfkill_wlan(handle, &state);
if (ACPI_FAILURE(status))
return -ENODEV;
if (blocked)
state &= ~1;
else
state |= 1;
status = cmpc_set_rfkill_wlan(handle, state);
if (ACPI_FAILURE(status))
return -ENODEV;
/* Check if we really need to call cmpc_set_rfkill_wlan */
is_blocked = state & 1 ? false : true;
if (is_blocked != blocked) {
state = blocked ? 0 : 1;
status = cmpc_set_rfkill_wlan(handle, state);
if (ACPI_FAILURE(status))
return -ENODEV;
}
return 0;
}

Expand Down

0 comments on commit 6ee6206

Please sign in to comment.