Commit 25ee76a2 authored by Guobin Huang's avatar Guobin Huang Committed by Herbert Xu

crypto: geode - 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 avatarGuobin Huang <huangguobin4@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent fa07c1a3
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/* Static structures */ /* Static structures */
static void __iomem *_iobase; static void __iomem *_iobase;
static spinlock_t lock; static DEFINE_SPINLOCK(lock);
/* Write a 128 bit field (either a writable key or IV) */ /* Write a 128 bit field (either a writable key or IV) */
static inline void static inline void
...@@ -383,8 +383,6 @@ static int geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -383,8 +383,6 @@ static int geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id)
goto erequest; goto erequest;
} }
spin_lock_init(&lock);
/* Clear any pending activity */ /* Clear any pending activity */
iowrite32(AES_INTR_PENDING | AES_INTR_MASK, _iobase + AES_INTR_REG); iowrite32(AES_INTR_PENDING | AES_INTR_MASK, _iobase + AES_INTR_REG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment