Commit f31a577a authored by Cai Huoqing's avatar Cai Huoqing Committed by Felix Fietkau

mt76: Make use of the helper macro kthread_run()

Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 2c4766fd
......@@ -70,17 +70,15 @@ mt76_worker_setup(struct ieee80211_hw *hw, struct mt76_worker *w,
if (fn)
w->fn = fn;
w->task = kthread_create(__mt76_worker_fn, w, "mt76-%s %s",
name, dev_name);
w->task = kthread_run(__mt76_worker_fn, w,
"mt76-%s %s", name, dev_name);
ret = PTR_ERR_OR_ZERO(w->task);
if (ret) {
if (IS_ERR(w->task)) {
ret = PTR_ERR(w->task);
w->task = NULL;
return ret;
}
wake_up_process(w->task);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment