Skip to content

Commit

Permalink
acer-wmi: Remove private workqueue
Browse files Browse the repository at this point in the history
As per Dmitry Torokhov's suggestion, acer-wmi doesn't need a private
workqueue, so remove it.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Carlos Corbacho authored and Len Brown committed Oct 11, 2008
1 parent a66bfa7 commit ae3a1b4
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions drivers/misc/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,6 @@ static void acer_backlight_exit(void)
/*
* Rfkill devices
*/
static struct workqueue_struct *rfkill_workqueue;

static void acer_rfkill_update(struct work_struct *ignored);
static DECLARE_DELAYED_WORK(acer_rfkill_work, acer_rfkill_update);
static void acer_rfkill_update(struct work_struct *ignored)
Expand All @@ -952,8 +950,7 @@ static void acer_rfkill_update(struct work_struct *ignored)
RFKILL_STATE_SOFT_BLOCKED);
}

queue_delayed_work(rfkill_workqueue, &acer_rfkill_work,
round_jiffies_relative(HZ));
schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ));
}

static int acer_rfkill_set(void *data, enum rfkill_state state)
Expand Down Expand Up @@ -1018,25 +1015,14 @@ static int acer_rfkill_init(struct device *dev)
}
}

rfkill_workqueue = create_singlethread_workqueue("rfkill_workqueue");
if (!rfkill_workqueue) {
if (has_cap(ACER_CAP_BLUETOOTH)) {
kfree(bluetooth_rfkill->data);
rfkill_unregister(bluetooth_rfkill);
}
kfree(wireless_rfkill->data);
rfkill_unregister(wireless_rfkill);
return -ENOMEM;
}
queue_delayed_work(rfkill_workqueue, &acer_rfkill_work, HZ);
schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ));

return 0;
}

static void acer_rfkill_exit(void)
{
cancel_delayed_work_sync(&acer_rfkill_work);
destroy_workqueue(rfkill_workqueue);
kfree(wireless_rfkill->data);
rfkill_unregister(wireless_rfkill);
if (has_cap(ACER_CAP_BLUETOOTH)) {
Expand Down

0 comments on commit ae3a1b4

Please sign in to comment.