Re: [PATCH 2/2 v2] dma/amba-pl08x: add support for the Nomadik variant

From: Viresh Kumar
Date: Wed Apr 11 2012 - 23:44:11 EST


On 4/12/2012 4:30 AM, Linus Walleij wrote:
> The Nomadik PL080 variant has some extra protection bits that
> may be set, so we need to check these bits to see if the
> channels are actually available for the DMAengine to use.
>
> Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
> Cc: Viresh Kumar <viresh.kumar@xxxxxx>
> Cc: Alim Akhtar <alim.akhtar@xxxxxxxxx>
> Cc: Alessandro Rubini <rubini@xxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> @@ -1917,7 +1926,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
> }
>
> /* Initialize physical channels */
> - pl08x->phy_chans = kmalloc((vd->channels * sizeof(*pl08x->phy_chans)),
> + pl08x->phy_chans = kzalloc((vd->channels * sizeof(*pl08x->phy_chans)),
> GFP_KERNEL);
> if (!pl08x->phy_chans) {
> dev_err(&adev->dev, "%s failed to allocate "
> @@ -1934,6 +1943,22 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
> spin_lock_init(&ch->lock);
> ch->serving = NULL;

I meant removing this one too. :)

Reviewed-by: Viresh Kumar <viresh.kumar@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/