Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149933
b: refs/heads/master
c: 492301f
h: refs/heads/master
i:
  149931: bce2c89
v: v3
  • Loading branch information
Larry Finger authored and John W. Linville committed Apr 22, 2009
1 parent 2dabfd1 commit 0fb1651
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 137907287789607f2a2586ad625e7b8c646b3425
refs/heads/master: 492301fb5d12e4a77a1010ad2b6f1ed306014123
9 changes: 8 additions & 1 deletion trunk/net/rfkill/rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ static void update_rfkill_state(struct rfkill *rfkill)
}
mutex_unlock(&rfkill->mutex);
}
rfkill_led_trigger(rfkill, rfkill->state);
}

/**
Expand Down Expand Up @@ -136,8 +137,9 @@ static int rfkill_toggle_radio(struct rfkill *rfkill,
oldstate = rfkill->state;

if (rfkill->get_state && !force &&
!rfkill->get_state(rfkill->data, &newstate))
!rfkill->get_state(rfkill->data, &newstate)) {
rfkill->state = newstate;
}

switch (state) {
case RFKILL_STATE_HARD_BLOCKED:
Expand Down Expand Up @@ -172,6 +174,7 @@ static int rfkill_toggle_radio(struct rfkill *rfkill,
if (force || rfkill->state != oldstate)
rfkill_uevent(rfkill);

rfkill_led_trigger(rfkill, rfkill->state);
return retval;
}

Expand Down Expand Up @@ -204,6 +207,7 @@ static void __rfkill_switch_all(const enum rfkill_type type,
mutex_lock(&rfkill->mutex);
rfkill_toggle_radio(rfkill, state, 0);
mutex_unlock(&rfkill->mutex);
rfkill_led_trigger(rfkill, rfkill->state);
}
}
}
Expand Down Expand Up @@ -256,6 +260,7 @@ void rfkill_epo(void)
RFKILL_STATE_SOFT_BLOCKED;
}
mutex_unlock(&rfkill_global_mutex);
rfkill_led_trigger(rfkill, rfkill->state);
}
EXPORT_SYMBOL_GPL(rfkill_epo);

Expand Down Expand Up @@ -358,6 +363,7 @@ int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state)
rfkill_uevent(rfkill);

mutex_unlock(&rfkill->mutex);
rfkill_led_trigger(rfkill, rfkill->state);

return 0;
}
Expand Down Expand Up @@ -520,6 +526,7 @@ static int rfkill_resume(struct device *dev)
1);

mutex_unlock(&rfkill->mutex);
rfkill_led_trigger(rfkill, rfkill->state);
}

return 0;
Expand Down

0 comments on commit 0fb1651

Please sign in to comment.