summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-23 15:14:59 +0100
committerLi Yang <leoyang.li@nxp.com>2021-04-06 22:24:43 +0200
commit7374a3e572fe90c89aa1fa78ced424822bcba663 (patch)
tree93c6cd81c79ed8aa4a14be8d7edf663cd7a30006 /drivers/soc
parentsoc: fsl: qbman: Delete useless kfree code (diff)
downloadlinux-7374a3e572fe90c89aa1fa78ced424822bcba663.tar.xz
linux-7374a3e572fe90c89aa1fa78ced424822bcba663.zip
soc: fsl: qe: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/fsl/qe/qe_common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 654e9246ce6b..a0cb8e746879 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/fsl/qe/qe_common.c
@@ -26,7 +26,7 @@
#include <soc/fsl/qe/qe.h>
static struct gen_pool *muram_pool;
-static spinlock_t cpm_muram_lock;
+static DEFINE_SPINLOCK(cpm_muram_lock);
static void __iomem *muram_vbase;
static phys_addr_t muram_pbase;
@@ -54,7 +54,6 @@ int cpm_muram_init(void)
if (muram_pbase)
return 0;
- spin_lock_init(&cpm_muram_lock);
np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data");
if (!np) {
/* try legacy bindings */