mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
rfkill: use variable instead of duplicating the expression
RFKILL_BLOCK_SW value have just been saved to prev, no need to check it again in the if expression. This makes code a little bit easier to read. Signed-off-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
573a2b51ac
commit
f3e7fae248
1 changed files with 1 additions and 1 deletions
|
|
@ -287,7 +287,7 @@ static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
|
|||
spin_lock_irqsave(&rfkill->lock, flags);
|
||||
prev = rfkill->state & RFKILL_BLOCK_SW;
|
||||
|
||||
if (rfkill->state & RFKILL_BLOCK_SW)
|
||||
if (prev)
|
||||
rfkill->state |= RFKILL_BLOCK_SW_PREV;
|
||||
else
|
||||
rfkill->state &= ~RFKILL_BLOCK_SW_PREV;
|
||||
|
|
|
|||
Loading…
Reference in a new issue