Re: [PATCH 1/2] DMAENGINE: define a dummy filter function for coh901318

From: Dan Williams
Date: Wed Sep 29 2010 - 17:04:26 EST


On Tue, Sep 28, 2010 at 12:03 AM, Linus Walleij
<linus.walleij@xxxxxxxxxxxxxx> wrote:
> All platform data has to be made conditional on
> as to avoid cluttering the code with other #ifdef:s.
>

The filter id function assumes that the channel passed in is a
coh901318 which requires that you are in a mach-u300 build and that no
other dma driver will ever appear on this platform. Which may be
true, but it would be safer to look at
chan->device->dev->platform_data and deduce that it is indeed a
coh901318 channel before de-referencing private fields. Taken further
if you rewrite the filter_id function in terms of platform_data then
it could live purely in the arch code and not depend on the driver.

...or did you already try this route and hit a snag?

--
Dan
--
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/