aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk/renesas
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2024-05-29 11:35:10 +0200
committerGeert Uytterhoeven <geert+renesas@glider.be>2024-06-07 14:10:15 +0200
commit2092760681b53cd0c1214444ac35737ff8a65024 (patch)
treed49466cf9ff37c19bfa7e3031fc8034b31e8e0f8 /drivers/clk/renesas
parent3b2f834dd3f952a0c69c0dacef68172742acacbc (diff)
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 <yebin10@huawei.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/8da2c908f00043f05f7e26e3c26400aea0cfe8bc.1716975021.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/clk/renesas')
-rw-r--r--drivers/clk/renesas/rcar-gen2-cpg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/renesas/rcar-gen2-cpg.c b/drivers/clk/renesas/rcar-gen2-cpg.c
index edae874fa2b6..4c3764972bad 100644
--- a/drivers/clk/renesas/rcar-gen2-cpg.c
+++ b/drivers/clk/renesas/rcar-gen2-cpg.c
@@ -30,7 +30,7 @@
#define CPG_ADSPCKCR 0x025c
#define CPG_RCANCKCR 0x0270
-static spinlock_t cpg_lock;
+static DEFINE_SPINLOCK(cpg_lock);
/*
* Z Clock
@@ -387,7 +387,5 @@ int __init rcar_gen2_cpg_init(const struct rcar_gen2_cpg_pll_config *config,
cpg_quirks = (uintptr_t)attr->data;
pr_debug("%s: mode = 0x%x quirks = 0x%x\n", __func__, mode, cpg_quirks);
- spin_lock_init(&cpg_lock);
-
return 0;
}