Fix DMA address truncation in gasket_coherent_buffer

`ulong` may not be sufficiently wide for addresses returned by the DMA
API. For example, a 32-bit platform can still have DMA addresses larger
than 32-bit. By using the correct type `dma_addr_t` we fix this
truncation.

Change-Id: Ibdf6456fdf12d889296e580de2acb910527ce0aa
Signed-off-by: Waqar Hameed <waqarh@axis.com>
This commit is contained in:
Waqar Hameed
2021-10-04 17:05:48 +02:00
committed by Michael Brooks
parent a6a43f3c6a
commit f047773516

View File

@@ -228,7 +228,7 @@ struct gasket_coherent_buffer {
u8 __iomem *virt_base;
/* Physical base address. */
ulong phys_base;
dma_addr_t phys_base;
/* Length of the mapping. */
ulong length_bytes;