Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197562
b: refs/heads/master
c: 3bb9702
h: refs/heads/master
v: v3
  • Loading branch information
Lee, Chun-Yi authored and Matthew Garrett committed May 20, 2010
1 parent 4a6640c commit d691560
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f27e17bfa2ad34a2dbb61cd097d9ecf506639df
refs/heads/master: 3bb970214fce6495573843e4b7b786f8ea94cd70
24 changes: 24 additions & 0 deletions trunk/drivers/platform/x86/msi-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,11 +581,31 @@ static void rfkill_cleanup(void)
}
}

static void msi_init_rfkill(struct work_struct *ignored)
{
if (rfk_wlan) {
rfkill_set_sw_state(rfk_wlan, !wlan_s);
rfkill_wlan_set(NULL, !wlan_s);
}
if (rfk_bluetooth) {
rfkill_set_sw_state(rfk_bluetooth, !bluetooth_s);
rfkill_bluetooth_set(NULL, !bluetooth_s);
}
if (rfk_threeg) {
rfkill_set_sw_state(rfk_threeg, !threeg_s);
rfkill_threeg_set(NULL, !threeg_s);
}
}
static DECLARE_DELAYED_WORK(msi_rfkill_init, msi_init_rfkill);

static int rfkill_init(struct platform_device *sdev)
{
/* add rfkill */
int retval;

/* keep the hardware wireless state */
get_wireless_state_ec_standard();

rfk_bluetooth = rfkill_alloc("msi-bluetooth", &sdev->dev,
RFKILL_TYPE_BLUETOOTH,
&rfkill_bluetooth_ops, NULL);
Expand Down Expand Up @@ -619,6 +639,10 @@ static int rfkill_init(struct platform_device *sdev)
goto err_threeg;
}

/* schedule to run rfkill state initial */
schedule_delayed_work(&msi_rfkill_init,
round_jiffies_relative(1 * HZ));

return 0;

err_threeg:
Expand Down

0 comments on commit d691560

Please sign in to comment.