aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/rfkill/rfkill.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index d5735799ccd9..ea0dc04b3c77 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -512,21 +512,9 @@ static void rfkill_release(struct device *dev)
512#ifdef CONFIG_PM 512#ifdef CONFIG_PM
513static int rfkill_suspend(struct device *dev, pm_message_t state) 513static int rfkill_suspend(struct device *dev, pm_message_t state)
514{ 514{
515 struct rfkill *rfkill = to_rfkill(dev); 515 /* mark class device as suspended */
516 516 if (dev->power.power_state.event != state.event)
517 if (dev->power.power_state.event != state.event) {
518 if (state.event & PM_EVENT_SLEEP) {
519 /* Stop transmitter, keep state, no notifies */
520 update_rfkill_state(rfkill);
521
522 mutex_lock(&rfkill->mutex);
523 rfkill->toggle_radio(rfkill->data,
524 RFKILL_STATE_SOFT_BLOCKED);
525 mutex_unlock(&rfkill->mutex);
526 }
527
528 dev->power.power_state = state; 517 dev->power.power_state = state;
529 }
530 518
531 return 0; 519 return 0;
532} 520}