Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: renesas: cpg-lib: Use DEFINE_SPINLOCK() for global spinlock

A global 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/9073a6bfb7791e492156331fa8a0ea87a7c7cef6.1716975021.git.geert+renesas@glider.be

+1 -5
+1 -1
drivers/clk/renesas/rcar-cpg-lib.c
··· 22 22 23 23 #include "rcar-cpg-lib.h" 24 24 25 - spinlock_t cpg_lock; 25 + DEFINE_SPINLOCK(cpg_lock); 26 26 27 27 void cpg_reg_modify(void __iomem *reg, u32 clear, u32 set) 28 28 {
-2
drivers/clk/renesas/rcar-gen3-cpg.c
··· 551 551 cpg_quirks = (uintptr_t)attr->data; 552 552 pr_debug("%s: mode = 0x%x quirks = 0x%x\n", __func__, mode, cpg_quirks); 553 553 554 - spin_lock_init(&cpg_lock); 555 - 556 554 return 0; 557 555 }
-2
drivers/clk/renesas/rcar-gen4-cpg.c
··· 466 466 cpg_clk_extalr = clk_extalr; 467 467 cpg_mode = mode; 468 468 469 - spin_lock_init(&cpg_lock); 470 - 471 469 return 0; 472 470 }