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

MIPS: Alchemy: Use DEFINE_SPINLOCK() for spinlock

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lifu Chen <chenlifu@huawei.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Lifu Chen and committed by
Thomas Bogendoerfer
dbd815c0 6decd1aa

+1 -2
+1 -2
arch/mips/alchemy/common/clock.c
··· 111 111 /* access locks to SYS_FREQCTRL0/1 and SYS_CLKSRC registers */ 112 112 static spinlock_t alchemy_clk_fg0_lock; 113 113 static spinlock_t alchemy_clk_fg1_lock; 114 - static spinlock_t alchemy_clk_csrc_lock; 114 + static DEFINE_SPINLOCK(alchemy_clk_csrc_lock); 115 115 116 116 /* CPU Core clock *****************************************************/ 117 117 ··· 996 996 if (!a) 997 997 return -ENOMEM; 998 998 999 - spin_lock_init(&alchemy_clk_csrc_lock); 1000 999 ret = 0; 1001 1000 1002 1001 for (i = 0; i < 6; i++) {