Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243135
b: refs/heads/master
c: 70a9b90
h: refs/heads/master
i:
  243133: 4d5df5c
  243131: 96fa5e4
  243127: b0cbc74
  243119: 02bfc0d
  243103: df5dfdf
  243071: f66158c
v: v3
  • Loading branch information
Lee, Chun-Yi authored and Matthew Garrett committed Mar 28, 2011
1 parent f985369 commit 3134de0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 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: 8215af019040ce9182728afee9642d8fdeb17f59
refs/heads/master: 70a9b9047aebd53ac38837a1046da52a2f8d9636
20 changes: 18 additions & 2 deletions trunk/drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,14 +1234,17 @@ static int acer_rfkill_init(struct device *dev)

rfkill_inited = true;

schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ));
if (ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID))
schedule_delayed_work(&acer_rfkill_work,
round_jiffies_relative(HZ));

return 0;
}

static void acer_rfkill_exit(void)
{
cancel_delayed_work_sync(&acer_rfkill_work);
if (ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID))
cancel_delayed_work_sync(&acer_rfkill_work);

rfkill_unregister(wireless_rfkill);
rfkill_destroy(wireless_rfkill);
Expand Down Expand Up @@ -1338,6 +1341,19 @@ static void acer_wmi_notify(u32 value, void *context)

switch (return_value.function) {
case WMID_HOTKEY_EVENT:
if (return_value.device_state) {
u16 device_state = return_value.device_state;
pr_debug("deivces states: 0x%x\n", device_state);
if (has_cap(ACER_CAP_WIRELESS))
rfkill_set_sw_state(wireless_rfkill,
!(device_state & ACER_WMID3_GDS_WIRELESS));
if (has_cap(ACER_CAP_BLUETOOTH))
rfkill_set_sw_state(bluetooth_rfkill,
!(device_state & ACER_WMID3_GDS_BLUETOOTH));
if (has_cap(ACER_CAP_THREEG))
rfkill_set_sw_state(threeg_rfkill,
!(device_state & ACER_WMID3_GDS_THREEG));
}
if (!sparse_keymap_report_event(acer_wmi_input_dev,
return_value.key_num, 1, true))
pr_warning("Unknown key number - 0x%x\n",
Expand Down

0 comments on commit 3134de0

Please sign in to comment.