soc: fsl: qe: Use DEFINE_SPINLOCK() for spinlock
authorZheng Yongjun <zhengyongjun3@huawei.com>
Wed, 23 Dec 2020 14:14:59 +0000 (22:14 +0800)
committerLi Yang <leoyang.li@nxp.com>
Tue, 6 Apr 2021 20:24:43 +0000 (15:24 -0500)
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>
drivers/soc/fsl/qe/qe_common.c

index 654e924..a0cb8e7 100644 (file)
@@ -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 */