Commit bd96a89c authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Krzysztof Kozlowski

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: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201228135056.28511-1-zhengyongjun3@huawei.comSigned-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent a2d522ff
...@@ -70,7 +70,7 @@ struct emif_data { ...@@ -70,7 +70,7 @@ struct emif_data {
}; };
static struct emif_data *emif1; static struct emif_data *emif1;
static spinlock_t emif_lock; static DEFINE_SPINLOCK(emif_lock);
static unsigned long irq_state; static unsigned long irq_state;
static u32 t_ck; /* DDR clock period in ps */ static u32 t_ck; /* DDR clock period in ps */
static LIST_HEAD(device_list); static LIST_HEAD(device_list);
...@@ -1531,7 +1531,6 @@ static int __init_or_module emif_probe(struct platform_device *pdev) ...@@ -1531,7 +1531,6 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
/* One-time actions taken on probing the first device */ /* One-time actions taken on probing the first device */
if (!emif1) { if (!emif1) {
emif1 = emif; emif1 = emif;
spin_lock_init(&emif_lock);
/* /*
* TODO: register notifiers for frequency and voltage * TODO: register notifiers for frequency and voltage
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment