summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw/regs.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-01-13 18:08:14 +0100
committerVinod Koul <vinod.koul@intel.com>2015-02-05 07:39:44 +0100
commitd8ded50f8b26a224df48f9f93e49440c6a39b77f (patch)
tree7c7620107180b0a2c3ea77770ef8fb9bccfa8341 /drivers/dma/dw/regs.h
parentdmaengine: dw: amend description of dma_dev field (diff)
downloadlinux-d8ded50f8b26a224df48f9f93e49440c6a39b77f.tar.xz
linux-d8ded50f8b26a224df48f9f93e49440c6a39b77f.zip
dmaengine: dw: define DW_DMA_MAX_NR_MASTERS
Instead of using magic number in the code the patch provides DW_DMA_MAX_NR_MASTERS constant. While here, restrict the reading of data width array by amount of the actual number of AHB masters. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dw/regs.h')
-rw-r--r--drivers/dma/dw/regs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/dw/regs.h b/drivers/dma/dw/regs.h
index 254a1db03680..241ff2b1402b 100644
--- a/drivers/dma/dw/regs.h
+++ b/drivers/dma/dw/regs.h
@@ -285,7 +285,7 @@ struct dw_dma {
/* hardware configuration */
unsigned char nr_masters;
- unsigned char data_width[4];
+ unsigned char data_width[DW_DMA_MAX_NR_MASTERS];
};
static inline struct dw_dma_regs __iomem *__dw_regs(struct dw_dma *dw)