Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122331
b: refs/heads/master
c: 24689c8
h: refs/heads/master
i:
  122329: ec9ac3e
  122327: 38f762d
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and John W. Linville committed Nov 26, 2008
1 parent b411693 commit 2e1a2ac
Show file tree
Hide file tree
Showing 2 changed files with 11 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: f80b5e99c7dac5a9a0d72496cec5075a12cd1476
refs/heads/master: 24689c8590be6bc0486af665c5ceda6aeff4d53a
10 changes: 10 additions & 0 deletions trunk/net/rfkill/rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,22 @@ static int rfkill_suspend(struct device *dev, pm_message_t state)
static int rfkill_resume(struct device *dev)
{
struct rfkill *rfkill = to_rfkill(dev);
enum rfkill_state newstate;

if (dev->power.power_state.event != PM_EVENT_ON) {
mutex_lock(&rfkill->mutex);

dev->power.power_state.event = PM_EVENT_ON;

/*
* rfkill->state could have been modified before we got
* called, and won't be updated by rfkill_toggle_radio()
* in force mode. Sync it FIRST.
*/
if (rfkill->get_state &&
!rfkill->get_state(rfkill->data, &newstate))
rfkill->state = newstate;

/*
* If we are under EPO, kick transmitter offline,
* otherwise restore to pre-suspend state.
Expand Down

0 comments on commit 2e1a2ac

Please sign in to comment.