[PATCH v3 1/2] dma: imx-dma: Add oftree support

From
Shawn Guo <hidden>
Date
2013-02-28 06:30:27
Also in
linux-devicetree
On Mon, Feb 25, 2013 at 05:04:14PM +0100, Markus Pargmann wrote:
Adding devicetree support for imx-dma driver. Use driver name for
function 'imx_dma_is_general_purpose' because the devicename for
devicetree initialized devices is different.
...
quoted hunk
@@ -63,7 +66,8 @@ static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
 	return strstr(dev_name(chan->device->dev), "sdma") ||
 		!strcmp(dev_name(chan->device->dev), "imx1-dma") ||
 		!strcmp(dev_name(chan->device->dev), "imx21-dma") ||
-		!strcmp(dev_name(chan->device->dev), "imx27-dma");
+		!strcmp(dev_name(chan->device->dev), "imx27-dma") ||
+		!strcmp(chan->device->dev->driver->name, "imx-dma");
 }
So the function could just look like the following?

static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
{
        return !strcmp(chan->device->dev->driver->name, "imx-sdma") ||
                !strcmp(chan->device->dev->driver->name, "imx-dma");
}

Shawn
Thread (1 message) 1 message, 1 author, last reply 2013-02-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help