diff options
author | Ye Bin <yebin10@huawei.com> | 2021-04-09 17:51:45 +0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-04 19:37:43 +1000 |
commit | d5f14dcf0016e8c86c424d1fd839b1e9ab000279 (patch) | |
tree | 395e2dc0c48ddefc31d0b1a4095ab74e65e496f6 /drivers/macintosh | |
parent | 295135d32fde7fa11c983cc7b1b79c49556c14cf (diff) |
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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210409095145.2294210-1-yebin10@huawei.com
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/via-pmu.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 4b98bc26a94b..facd21e2d1d6 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -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 | |