Skip to content

Commit 2092760

Browse files
committed
clk: renesas: rcar-gen2: Use DEFINE_SPINLOCK() for static spinlock
A static spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Suggested-by: Ye Bin <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/8da2c908f00043f05f7e26e3c26400aea0cfe8bc.1716975021.git.geert+renesas@glider.be
1 parent 3b2f834 commit 2092760

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/renesas/rcar-gen2-cpg.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define CPG_ADSPCKCR 0x025c
3131
#define CPG_RCANCKCR 0x0270
3232

33-
static spinlock_t cpg_lock;
33+
static DEFINE_SPINLOCK(cpg_lock);
3434

3535
/*
3636
* Z Clock
@@ -387,7 +387,5 @@ int __init rcar_gen2_cpg_init(const struct rcar_gen2_cpg_pll_config *config,
387387
cpg_quirks = (uintptr_t)attr->data;
388388
pr_debug("%s: mode = 0x%x quirks = 0x%x\n", __func__, mode, cpg_quirks);
389389

390-
spin_lock_init(&cpg_lock);
391-
392390
return 0;
393391
}

0 commit comments

Comments
 (0)