devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: dma: protect list write operation by spin_lock
@ 2013-01-28 15:24 Andy Shevchenko
       [not found] ` <1359386694-20548-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2013-01-28 15:24 UTC (permalink / raw)
  To: Grant Likely, Rob Herring,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Arnd Bergmann
  Cc: Andy Shevchenko

Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 drivers/of/dma.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/of/dma.c b/drivers/of/dma.c
index 59631b2..1ae6120 100644
--- a/drivers/of/dma.c
+++ b/drivers/of/dma.c
@@ -117,7 +117,9 @@ int of_dma_controller_register(struct device_node *np,
 	ofdma->use_count = 0;
 
 	/* Now queue of_dma controller structure in list */
+	spin_lock(&of_dma_lock);
 	list_add_tail(&ofdma->of_dma_controllers, &of_dma_list);
+	spin_unlock(&of_dma_lock);
 
 	return 0;
 }
-- 
1.7.10.4

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

end of thread, other threads:[~2013-02-13 10:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 15:24 [PATCH] of: dma: protect list write operation by spin_lock Andy Shevchenko
     [not found] ` <1359386694-20548-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-01-28 15:52   ` Rob Herring
     [not found]     ` <51069EA0.4040004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-28 16:07       ` Vinod Koul
     [not found]         ` <20130128160757.GA6396-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-01-29 15:36           ` Rob Herring
     [not found]             ` <5107EC8D.5070001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-12 17:20               ` Vinod Koul
     [not found]                 ` <20130212172027.GT3789-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-02-13  7:48                   ` Andy Shevchenko
2013-02-13 10:48                     ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).