mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
crypto: ixp4xx - 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>
This commit is contained in:
parent
25ee76a221
commit
7dad7d007a
1 changed files with 2 additions and 5 deletions
|
@ -265,7 +265,7 @@ static int setup_crypt_desc(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static spinlock_t desc_lock;
|
||||
static DEFINE_SPINLOCK(desc_lock);
|
||||
static struct crypt_ctl *get_crypt_desc(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -293,7 +293,7 @@ static struct crypt_ctl *get_crypt_desc(void)
|
|||
}
|
||||
}
|
||||
|
||||
static spinlock_t emerg_lock;
|
||||
static DEFINE_SPINLOCK(emerg_lock);
|
||||
static struct crypt_ctl *get_crypt_desc_emerg(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -1379,9 +1379,6 @@ static int __init ixp_module_init(void)
|
|||
if (IS_ERR(pdev))
|
||||
return PTR_ERR(pdev);
|
||||
|
||||
spin_lock_init(&desc_lock);
|
||||
spin_lock_init(&emerg_lock);
|
||||
|
||||
err = init_ixp_crypto(&pdev->dev);
|
||||
if (err) {
|
||||
platform_device_unregister(pdev);
|
||||
|
|
Loading…
Reference in a new issue