mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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: Cai Huoqing <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
f81f42fe87
commit
fd25a55096
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user