All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] drivers: memory: Use DEFINE_SPINLOCK() for spinlock
@ 2020-12-28 13:50 Zheng Yongjun
  2021-01-03 16:41 ` (subset) " Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-28 13:50 UTC (permalink / raw)
  To: ssantosh, krzk, linux-kernel; +Cc: Zheng Yongjun

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

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/memory/emif.c | 3 +--
 1 file changed, 1 insertion(+), 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
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: (subset) [PATCH -next] drivers: memory: Use DEFINE_SPINLOCK() for spinlock
  2020-12-28 13:50 [PATCH -next] drivers: memory: Use DEFINE_SPINLOCK() for spinlock Zheng Yongjun
@ 2021-01-03 16:41 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-03 16:41 UTC (permalink / raw)
  To: ssantosh, Zheng Yongjun, linux-kernel; +Cc: Krzysztof Kozlowski

On Mon, 28 Dec 2020 21:50:56 +0800, Zheng Yongjun wrote:
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().

Applied, thanks!

[1/1] drivers: memory: Use DEFINE_SPINLOCK() for spinlock
      commit: bd96a89ca3fe874c98fe057cccb087603d76e5d4

Best regards,
-- 
Krzysztof Kozlowski <krzk@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-03 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 13:50 [PATCH -next] drivers: memory: Use DEFINE_SPINLOCK() for spinlock Zheng Yongjun
2021-01-03 16:41 ` (subset) " Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.