diff options
author | Christoph Hellwig <hch@lst.de> | 2017-08-25 11:13:09 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-09-01 05:59:17 -0400 |
commit | 2436bdcda53ff4abb7897c87fa29ef3de8055344 (patch) | |
tree | aa9204da61d1e888fea12ac09c948f5d77e793c5 /drivers/base/dma-mapping.c | |
parent | b32dbc1e0bf0eaa8bdd725491b361d5fc2f57a85 (diff) |
dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags
DMA_MEMORY_IO was never used in the tree, so remove it. That means there is
no need for the DMA_MEMORY_MAP flag either now, so remove it as well and
change dma_declare_coherent_memory to return a normal errno value.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'drivers/base/dma-mapping.c')
-rw-r--r-- | drivers/base/dma-mapping.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index b555ff9dd8fc..e584eddef0a7 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c | |||
@@ -176,13 +176,10 @@ int dmam_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, | |||
176 | 176 | ||
177 | rc = dma_declare_coherent_memory(dev, phys_addr, device_addr, size, | 177 | rc = dma_declare_coherent_memory(dev, phys_addr, device_addr, size, |
178 | flags); | 178 | flags); |
179 | if (rc) { | 179 | if (!rc) |
180 | devres_add(dev, res); | 180 | devres_add(dev, res); |
181 | rc = 0; | 181 | else |
182 | } else { | ||
183 | devres_free(res); | 182 | devres_free(res); |
184 | rc = -ENOMEM; | ||
185 | } | ||
186 | 183 | ||
187 | return rc; | 184 | return rc; |
188 | } | 185 | } |