Commit 83bff109 authored by Cai Huoqing's avatar Cai Huoqing Committed by Herbert Xu
Browse files

crypto: ccp - 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 avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 284340a3
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -467,7 +467,7 @@ static int ccp_init(struct ccp_device *ccp)

		cmd_q = &ccp->cmd_q[i];

		kthread = kthread_create(ccp_cmd_queue_thread, cmd_q,
		kthread = kthread_run(ccp_cmd_queue_thread, cmd_q,
				      "%s-q%u", ccp->name, cmd_q->id);
		if (IS_ERR(kthread)) {
			dev_err(dev, "error creating queue thread (%ld)\n",
@@ -477,7 +477,6 @@ static int ccp_init(struct ccp_device *ccp)
		}

		cmd_q->kthread = kthread;
		wake_up_process(kthread);
	}

	dev_dbg(dev, "Enabling interrupts...\n");
+2 −3
Original line number Diff line number Diff line
@@ -950,7 +950,7 @@ static int ccp5_init(struct ccp_device *ccp)

		cmd_q = &ccp->cmd_q[i];

		kthread = kthread_create(ccp_cmd_queue_thread, cmd_q,
		kthread = kthread_run(ccp_cmd_queue_thread, cmd_q,
				      "%s-q%u", ccp->name, cmd_q->id);
		if (IS_ERR(kthread)) {
			dev_err(dev, "error creating queue thread (%ld)\n",
@@ -960,7 +960,6 @@ static int ccp5_init(struct ccp_device *ccp)
		}

		cmd_q->kthread = kthread;
		wake_up_process(kthread);
	}

	dev_dbg(dev, "Enabling interrupts...\n");