[PATCH -next] ARM: davinci: dm646x-evm: use DEFINE_SPINLOCK() for spinlock

From: Chen Lifu
Date: Sat Mar 27 2021 - 05:53:45 EST


From: Lifu Chen <chenlifu@xxxxxxxxxx>

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Lifu Chen <chenlifu@xxxxxxxxxx>
---
arch/arm/mach-davinci/board-dm646x-evm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 952ddabc743e..a07b5f83a373 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -470,7 +470,7 @@ static struct davinci_i2c_platform_data i2c_pdata = {
#define TVP5147_CH1 "tvp514x-1"

/* spin lock for updating above registers */
-static spinlock_t vpif_reg_lock;
+static DEFINE_SPINLOCK(vpif_reg_lock);

static int set_vpif_clock(int mux_mode, int hd)
{
@@ -746,8 +746,6 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = {

static void __init evm_init_video(void)
{
- spin_lock_init(&vpif_reg_lock);
-
dm646x_setup_vpif(&dm646x_vpif_display_config,
&dm646x_vpif_capture_cfg);
}