summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/geode-aes.c
diff options
context:
space:
mode:
authorGuobin Huang <huangguobin4@huawei.com>2021-04-06 20:00:03 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-04-16 21:16:31 +1000
commit25ee76a221b01c4044fbcfe0b8cfd3d4f5982f2b (patch)
treeb19de0a18c772ccf5bf1c6cfc12e6f0f20958edc /drivers/crypto/geode-aes.c
parentfa07c1a30be7144f5d3292208f5d58799c92189f (diff)
downloadlinux-25ee76a221b01c4044fbcfe0b8cfd3d4f5982f2b.tar.gz
linux-25ee76a221b01c4044fbcfe0b8cfd3d4f5982f2b.tar.bz2
linux-25ee76a221b01c4044fbcfe0b8cfd3d4f5982f2b.zip
crypto: geode - use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Guobin Huang <huangguobin4@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/geode-aes.c')
-rw-r--r--drivers/crypto/geode-aes.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 4ee010f39912..fa5a9f207bc9 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -21,7 +21,7 @@
/* Static structures */
static void __iomem *_iobase;
-static spinlock_t lock;
+static DEFINE_SPINLOCK(lock);
/* Write a 128 bit field (either a writable key or IV) */
static inline void
@@ -383,8 +383,6 @@ static int geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id)
goto erequest;
}
- spin_lock_init(&lock);
-
/* Clear any pending activity */
iowrite32(AES_INTR_PENDING | AES_INTR_MASK, _iobase + AES_INTR_REG);