diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-10-18 10:34:12 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-01-08 01:04:52 -0500 |
commit | e63a47a361e03eaf79e0f2f6cdaca8e7679d1867 (patch) | |
tree | 0cbd9b8403484048fbf97f5d4efa3a6df1d53274 /drivers/dma/dw_dmac_regs.h | |
parent | ba84bd7146b9244de0ce04cdc668521a73f5336f (diff) |
dw_dmac: introduce to_dw_desc() macro
The to_dw_desc() macro helps to retrieve the dw_desc node from the
corresponding list_head structure.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac_regs.h')
-rw-r--r-- | drivers/dma/dw_dmac_regs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h index 88a069f66b89..8881e9b277a3 100644 --- a/drivers/dma/dw_dmac_regs.h +++ b/drivers/dma/dw_dmac_regs.h | |||
@@ -299,6 +299,8 @@ struct dw_desc { | |||
299 | size_t len; | 299 | size_t len; |
300 | }; | 300 | }; |
301 | 301 | ||
302 | #define to_dw_desc(h) list_entry(h, struct dw_desc, desc_node) | ||
303 | |||
302 | static inline struct dw_desc * | 304 | static inline struct dw_desc * |
303 | txd_to_dw_desc(struct dma_async_tx_descriptor *txd) | 305 | txd_to_dw_desc(struct dma_async_tx_descriptor *txd) |
304 | { | 306 | { |