Commit 63655b62 authored by Tang Yizhou's avatar Tang Yizhou Committed by Herbert Xu
Browse files

crypto: ccp - Use DEFINE_SPINLOCK() for spinlock



spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarTang Yizhou <tangyizhou@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent fd4317b7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ struct ccp_crypto_queue {
#define CCP_CRYPTO_MAX_QLEN	100

static struct ccp_crypto_queue req_queue;
static spinlock_t req_queue_lock;
static DEFINE_SPINLOCK(req_queue_lock);

struct ccp_crypto_cmd {
	struct list_head entry;
@@ -410,7 +410,6 @@ static int ccp_crypto_init(void)
		return ret;
	}

	spin_lock_init(&req_queue_lock);
	INIT_LIST_HEAD(&req_queue.cmds);
	req_queue.backlog = &req_queue.cmds;
	req_queue.cmd_count = 0;