diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-28 16:50:56 +0300 |
---|---|---|
committer | Krzysztof Kozlowski <krzk@kernel.org> | 2021-01-03 19:40:20 +0300 |
commit | bd96a89ca3fe874c98fe057cccb087603d76e5d4 (patch) | |
tree | 00682ee1ea37ac76e8d4b850750898f50a054ba7 /drivers/memory/emif.c | |
parent | a2d522ff0f5cc26915c4ccee9457fd4b4e1edc48 (diff) | |
download | linux-bd96a89ca3fe874c98fe057cccb087603d76e5d4.tar.xz |
memory: emif: Use DEFINE_SPINLOCK() for spinlock
Spinlock can be initialized automatically with DEFINE_SPINLOCK() rather
than explicitly calling spin_lock_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201228135056.28511-1-zhengyongjun3@huawei.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'drivers/memory/emif.c')
-rw-r--r-- | drivers/memory/emif.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index ddb1879f07d3..f7825eef5894 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -70,7 +70,7 @@ struct emif_data { }; static struct emif_data *emif1; -static spinlock_t emif_lock; +static DEFINE_SPINLOCK(emif_lock); static unsigned long irq_state; static u32 t_ck; /* DDR clock period in ps */ static LIST_HEAD(device_list); @@ -1531,7 +1531,6 @@ static int __init_or_module emif_probe(struct platform_device *pdev) /* One-time actions taken on probing the first device */ if (!emif1) { emif1 = emif; - spin_lock_init(&emif_lock); /* * TODO: register notifiers for frequency and voltage |