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: 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

+1 -3
+1 -3
drivers/clk/renesas/rcar-gen2-cpg.c
··· 30 30 #define CPG_ADSPCKCR 0x025c 31 31 #define CPG_RCANCKCR 0x0270 32 32 33 - static spinlock_t cpg_lock; 33 + static DEFINE_SPINLOCK(cpg_lock); 34 34 35 35 /* 36 36 * Z Clock ··· 386 386 if (attr) 387 387 cpg_quirks = (uintptr_t)attr->data; 388 388 pr_debug("%s: mode = 0x%x quirks = 0x%x\n", __func__, mode, cpg_quirks); 389 - 390 - spin_lock_init(&cpg_lock); 391 389 392 390 return 0; 393 391 }