diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-10-21 11:41:49 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-10-23 14:23:45 +0300 |
commit | f31a577ae7365bcdaaedbb2064be78e2c4f2946f (patch) | |
tree | 8eaffa6717310650a8d9eab5c3cd2270594a36cf /drivers/net/wireless/mediatek/mt76/util.h | |
parent | 2c4766fd5d3d390cbdd1f71eacee13a756d8ef0e (diff) |
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 <caihuoqing@baidu.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/util.h')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/util.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/util.h b/drivers/net/wireless/mediatek/mt76/util.h index 1c363ea9ab9c..49c52d781f40 100644 --- a/drivers/net/wireless/mediatek/mt76/util.h +++ b/drivers/net/wireless/mediatek/mt76/util.h @@ -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; } |