From 08ae186dc71f90c4fec3aaf0986588a43bcd1ee0 Mon Sep 17 00:00:00 2001 From: Fabien Crespel Date: Mon, 23 Jun 2008 17:23:06 -0300 Subject: [PATCH] --- yaml --- r: 103147 b: refs/heads/master c: fbc6af2f3c46df4722f5161d0ad20dd87cd7dfa9 h: refs/heads/master i: 103145: 87206d5001a835c5d2be677650eb40d9388a10ae 103143: 13dfa40852ceaa1cb2112c2f53c1219dea9b0c0c v: v3 --- [refs] | 2 +- trunk/net/rfkill/rfkill-input.c | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index b13a0d6f0ac2..8b50a8dfdbc1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ffb67c34e436fb163c4067936ccec797354fa6c6 +refs/heads/master: fbc6af2f3c46df4722f5161d0ad20dd87cd7dfa9 diff --git a/trunk/net/rfkill/rfkill-input.c b/trunk/net/rfkill/rfkill-input.c index 29c13d308b31..d285f9a9d829 100644 --- a/trunk/net/rfkill/rfkill-input.c +++ b/trunk/net/rfkill/rfkill-input.c @@ -30,27 +30,15 @@ struct rfkill_task { spinlock_t lock; /* for accessing last and desired state */ unsigned long last; /* last schedule */ enum rfkill_state desired_state; /* on/off */ - enum rfkill_state current_state; /* on/off */ }; static void rfkill_task_handler(struct work_struct *work) { struct rfkill_task *task = container_of(work, struct rfkill_task, work); - enum rfkill_state state; mutex_lock(&task->mutex); - /* - * Use temp variable to fetch desired state to keep it - * consistent even if rfkill_schedule_toggle() runs in - * another thread or interrupts us. - */ - state = task->desired_state; - - if (state != task->current_state) { - rfkill_switch_all(task->type, state); - task->current_state = state; - } + rfkill_switch_all(task->type, task->desired_state); mutex_unlock(&task->mutex); } @@ -94,7 +82,6 @@ static void rfkill_schedule_toggle(struct rfkill_task *task) .mutex = __MUTEX_INITIALIZER(n.mutex), \ .lock = __SPIN_LOCK_UNLOCKED(n.lock), \ .desired_state = RFKILL_STATE_ON, \ - .current_state = RFKILL_STATE_ON, \ } static DEFINE_RFKILL_TASK(rfkill_wlan, RFKILL_TYPE_WLAN);