提交 d5f14dcf 编写于 作者: Y Ye Bin 提交者: Michael Ellerman

macintosh/via-pmu: Use DEFINE_SPINLOCK() for spinlock

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Reported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NYe Bin <yebin10@huawei.com>
Signed-off-by: NChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210409095145.2294210-1-yebin10@huawei.com
上级 295135d3
......@@ -161,7 +161,7 @@ static unsigned char __iomem *gpio_reg;
static int gpio_irq = 0;
static int gpio_irq_enabled = -1;
static volatile int pmu_suspended;
static spinlock_t pmu_lock;
static DEFINE_SPINLOCK(pmu_lock);
static u8 pmu_intr_mask;
static int pmu_version;
static int drop_interrupts;
......@@ -305,8 +305,6 @@ int __init find_via_pmu(void)
goto fail;
}
spin_lock_init(&pmu_lock);
pmu_has_adb = 1;
pmu_intr_mask = PMU_INT_PCEJECT |
......@@ -388,8 +386,6 @@ int __init find_via_pmu(void)
pmu_kind = PMU_UNKNOWN;
spin_lock_init(&pmu_lock);
pmu_has_adb = 1;
pmu_intr_mask = PMU_INT_PCEJECT |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册