Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Yin Xiujiang <[email protected]>
---
net/batman-adv/tp_meter.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index 93730d30af54..a36e498c7c8f 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -905,7 +905,7 @@ static void batadv_tp_start_kthread(struct batadv_tp_vars *tp_vars)
u32 session_cookie;
kref_get(&tp_vars->refcount);
- kthread = kthread_create(batadv_tp_send, tp_vars, "kbatadv_tp_meter");
+ kthread = kthread_run(batadv_tp_send, tp_vars, "kbatadv_tp_meter");
if (IS_ERR(kthread)) {
session_cookie = batadv_tp_session_cookie(tp_vars->session,
tp_vars->icmp_uid);
@@ -921,8 +921,6 @@ static void batadv_tp_start_kthread(struct batadv_tp_vars *tp_vars)
batadv_tp_sender_cleanup(bat_priv, tp_vars);
return;
}
-
- wake_up_process(kthread);
}
/**
--
2.30.0