summaryrefslogtreecommitdiff
path: root/drivers/scsi/bnx2fc
diff options
context:
space:
mode:
authorYin Xiujiang <yinxiujiang@kylinos.cn>2022-01-26 09:42:48 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2022-01-31 16:56:57 -0500
commit687ba48e16e487c9910b20662a29baff98539ec8 (patch)
treed228310c1ae0299b9d243853f7216ebc2e96332b /drivers/scsi/bnx2fc
parentdd84a4b0fe173c4db2e95cf6a2b74cdce7bbab13 (diff)
scsi: bnx2fc: Make use of the helper macro kthread_run()
Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Link: https://lore.kernel.org/r/20220126014248.466806-1-yinxiujiang@kylinos.cn Signed-off-by: Yin Xiujiang <yinxiujiang@kylinos.cn> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 71fa62bd3083..68c4e3c3e7bb 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2723,14 +2723,13 @@ static int __init bnx2fc_mod_init(void)
bg = &bnx2fc_global;
skb_queue_head_init(&bg->fcoe_rx_list);
- l2_thread = kthread_create(bnx2fc_l2_rcv_thread,
- (void *)bg,
- "bnx2fc_l2_thread");
+ l2_thread = kthread_run(bnx2fc_l2_rcv_thread,
+ (void *)bg,
+ "bnx2fc_l2_thread");
if (IS_ERR(l2_thread)) {
rc = PTR_ERR(l2_thread);
goto free_wq;
}
- wake_up_process(l2_thread);
spin_lock_bh(&bg->fcoe_rx_list.lock);
bg->kthread = l2_thread;
spin_unlock_bh(&bg->fcoe_rx_list.lock);