soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock
PATCH 1/1 soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init().
--- drivers/soc/fsl/qe/qe_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soc/fsl/qe/qe_common.c +1 -2
@@ -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 */
Quoted 12 lines
-----Original Message-----
From: Ye Bin <[email protected]>
Sent: Friday, April 9, 2021 4:52 AM
To: [email protected]; Qiang Zhao <[email protected]>; Leo Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Hulk Robot <[email protected]>
Subject: [PATCH -next] soc: fsl: qe: useDEFINE_SPINLOCK()for spinlock
Quoted 2 lines
spinlock can be initialized automatically with
DEFINE_SPINLOCK()rather than explicitly callingspin_lock_init().
The previous version has been applied. Thanks.
Quoted 29 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Ye Bin <[email protected]>--- drivers/soc/fsl/qe/qe_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/soc/fsl/qe/qe_common.cindex654e9246ce6b..a0cb8e746879100644drivers/soc/fsl/qe/qe_common.c +1
-2@@ -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 */