[PATCH] of: dma: protect list write operation by spin_lock
Rob Herring
robherring2 at gmail.com
Tue Jan 29 02:52:00 EST 2013
On 01/28/2013 09:24 AM, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> ---
> drivers/of/dma.c | 2 ++
> 1 file changed, 2 insertions(+)
You need to cc whomever has this file in their tree which is Vinod.
Acked-by: Rob Herring <rob.herring at calxeda.com>
Vinod, it's probably better to move drivers/of/dma.c to drivers/dma.
That's been the direction we've been taking with new OF binding code. I
must have missed that in the review.
Rob
>
> 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;
> }
>
More information about the devicetree-discuss
mailing list