diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-01-13 12:08:14 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-02-05 01:39:44 -0500 |
commit | d8ded50f8b26a224df48f9f93e49440c6a39b77f (patch) | |
tree | 7c7620107180b0a2c3ea77770ef8fb9bccfa8341 /include/linux/platform_data | |
parent | cfd8fef322305bbe9955817464f0d2054ce545c0 (diff) |
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 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/dma-dw.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h index 359127d290e7..87ac14c584f2 100644 --- a/include/linux/platform_data/dma-dw.h +++ b/include/linux/platform_data/dma-dw.h | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | 15 | ||
16 | #define DW_DMA_MAX_NR_MASTERS 4 | ||
17 | |||
16 | /** | 18 | /** |
17 | * struct dw_dma_slave - Controller-specific information about a slave | 19 | * struct dw_dma_slave - Controller-specific information about a slave |
18 | * | 20 | * |
@@ -53,7 +55,7 @@ struct dw_dma_platform_data { | |||
53 | unsigned char chan_priority; | 55 | unsigned char chan_priority; |
54 | unsigned short block_size; | 56 | unsigned short block_size; |
55 | unsigned char nr_masters; | 57 | unsigned char nr_masters; |
56 | unsigned char data_width[4]; | 58 | unsigned char data_width[DW_DMA_MAX_NR_MASTERS]; |
57 | }; | 59 | }; |
58 | 60 | ||
59 | #endif /* _PLATFORM_DATA_DMA_DW_H */ | 61 | #endif /* _PLATFORM_DATA_DMA_DW_H */ |