Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328303
b: refs/heads/master
c: eab4834
h: refs/heads/master
i:
  328301: c08f499
  328299: 017a018
  328295: 4cd9331
  328287: 7dd28ac
v: v3
  • Loading branch information
Vitaly Wool authored and Johannes Berg committed Sep 24, 2012
1 parent 8c3eca2 commit c2fa61c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: c6f219dc83fbb30c8426fcc7850c28d9d33dee44
refs/heads/master: eab48345c2b2d791159aaac4a77000baa8dbc1ae
8 changes: 7 additions & 1 deletion trunk/net/rfkill/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ static bool __rfkill_set_hw_state(struct rfkill *rfkill,
static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
{
unsigned long flags;
bool prev, curr;
int err;

if (unlikely(rfkill->dev.power.power_state.event & PM_EVENT_SLEEP))
Expand All @@ -284,6 +285,8 @@ static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
rfkill->ops->query(rfkill, rfkill->data);

spin_lock_irqsave(&rfkill->lock, flags);
prev = rfkill->state & RFKILL_BLOCK_SW;

if (rfkill->state & RFKILL_BLOCK_SW)
rfkill->state |= RFKILL_BLOCK_SW_PREV;
else
Expand Down Expand Up @@ -313,10 +316,13 @@ static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
}
rfkill->state &= ~RFKILL_BLOCK_SW_SETCALL;
rfkill->state &= ~RFKILL_BLOCK_SW_PREV;
curr = rfkill->state & RFKILL_BLOCK_SW;
spin_unlock_irqrestore(&rfkill->lock, flags);

rfkill_led_trigger_event(rfkill);
rfkill_event(rfkill);

if (prev != curr)
rfkill_event(rfkill);
}

#ifdef CONFIG_RFKILL_INPUT
Expand Down

0 comments on commit c2fa61c

Please sign in to comment.