Re: [PATCH] driver for the ARM PL080/PL081 PrimeCells v5

From: Linus Walleij
Date: Wed Sep 29 2010 - 18:40:14 EST


2010/9/29 Dan Williams <dan.j.williams@xxxxxxxxx>:
> [Me]
>> +/*
>> + * Initialize a descriptor to be used by memcpy submit
>> + */
>> +static struct dma_async_tx_descriptor *pl08x_prep_dma_memcpy(
>> +               struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
>> +               size_t len, unsigned long flags)
>> +{
>> +       struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
>> +       struct pl08x_driver_data *pl08x = plchan->host;
>> +       struct pl08x_txd *txd;
>> +       int ret;
>> +
>> +       txd = kzalloc(sizeof(struct pl08x_txd), GFP_KERNEL);
>> +       if (!txd) {
>> +               dev_err(&pl08x->adev->dev,
>> +                       "%s no memory for descriptor\n", __func__);
>> +               return NULL;
>> +       }
>
> With your acknowledgment I'll append a patch to convert this to
> GFP_NOWAIT because device_prep_dma_memcpy() is meant to be callable
> from atomic contexts.

Damn typically I forgot something. Please go ahead with this!
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>

Yours,
Linus Walleij
--
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/