aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-06-27 09:09:01 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-10-31 10:48:52 -0400
commit224ddca0f2f44986214ee8f9e6e0280bf2016655 (patch)
tree6b8bac40ae2d3848541938bd1767189e3e276cb4 /drivers/media/platform/omap3isp
parent24353b8bb4ecfc7f751019ee599c89d5175e12a1 (diff)
DMA-API: media: omap3isp: use dma_coerce_mask_and_coherent()
The code sequence: isp->raw_dmamask = DMA_BIT_MASK(32); isp->dev->dma_mask = &isp->raw_dmamask; isp->dev->coherent_dma_mask = DMA_BIT_MASK(32); bypasses the architectures check on the DMA mask. It can be replaced with dma_coerce_mask_and_coherent(), avoiding the direct initialization of this mask. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/media/platform/omap3isp')
-rw-r--r--drivers/media/platform/omap3isp/isp.c6
-rw-r--r--drivers/media/platform/omap3isp/isp.h3
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index df3a0ec7fd2c..1c3608039663 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2182,9 +2182,9 @@ static int isp_probe(struct platform_device *pdev)
2182 isp->pdata = pdata; 2182 isp->pdata = pdata;
2183 isp->ref_count = 0; 2183 isp->ref_count = 0;
2184 2184
2185 isp->raw_dmamask = DMA_BIT_MASK(32); 2185 ret = dma_coerce_mask_and_coherent(isp->dev, DMA_BIT_MASK(32));
2186 isp->dev->dma_mask = &isp->raw_dmamask; 2186 if (ret)
2187 isp->dev->coherent_dma_mask = DMA_BIT_MASK(32); 2187 return ret;
2188 2188
2189 platform_set_drvdata(pdev, isp); 2189 platform_set_drvdata(pdev, isp);
2190 2190
diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h
index cd3eff45ae7d..ce65d3ae1aa7 100644
--- a/drivers/media/platform/omap3isp/isp.h
+++ b/drivers/media/platform/omap3isp/isp.h
@@ -152,7 +152,6 @@ struct isp_xclk {
152 * @mmio_base_phys: Array with physical L4 bus addresses for ISP register 152 * @mmio_base_phys: Array with physical L4 bus addresses for ISP register
153 * regions. 153 * regions.
154 * @mmio_size: Array with ISP register regions size in bytes. 154 * @mmio_size: Array with ISP register regions size in bytes.
155 * @raw_dmamask: Raw DMA mask
156 * @stat_lock: Spinlock for handling statistics 155 * @stat_lock: Spinlock for handling statistics
157 * @isp_mutex: Mutex for serializing requests to ISP. 156 * @isp_mutex: Mutex for serializing requests to ISP.
158 * @crashed: Bitmask of crashed entities (indexed by entity ID) 157 * @crashed: Bitmask of crashed entities (indexed by entity ID)
@@ -190,8 +189,6 @@ struct isp_device {
190 unsigned long mmio_base_phys[OMAP3_ISP_IOMEM_LAST]; 189 unsigned long mmio_base_phys[OMAP3_ISP_IOMEM_LAST];
191 resource_size_t mmio_size[OMAP3_ISP_IOMEM_LAST]; 190 resource_size_t mmio_size[OMAP3_ISP_IOMEM_LAST];
192 191
193 u64 raw_dmamask;
194
195 /* ISP Obj */ 192 /* ISP Obj */
196 spinlock_t stat_lock; /* common lock for statistic drivers */ 193 spinlock_t stat_lock; /* common lock for statistic drivers */
197 struct mutex isp_mutex; /* For handling ref_count field */ 194 struct mutex isp_mutex; /* For handling ref_count field */