Skip to content

Commit

Permalink
ARM/dma-mapping: remove the dma_coherent member of struct dev_archdata
Browse files Browse the repository at this point in the history
Since commit ae626eb ("ARM/dma-mapping: use dma-direct
unconditionally") only the dma_coherent flag in struct device is used,
so remove the now write only flag in struct dev_archdata.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
  • Loading branch information
Christoph Hellwig committed Oct 6, 2022
1 parent 49bc8be commit c9cb013
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion arch/arm/include/asm/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ struct dev_archdata {
#ifdef CONFIG_ARM_DMA_USE_IOMMU
struct dma_iommu_mapping *mapping;
#endif
unsigned int dma_coherent:1;
unsigned int dma_ops_setup:1;
};

Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,10 +1775,8 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
* here, but instead have to make sure we only set but never clear it
* for now.
*/
if (coherent) {
dev->archdata.dma_coherent = true;
if (coherent)
dev->dma_coherent = true;
}

/*
* Don't override the dma_ops if they have already been set. Ideally
Expand Down

0 comments on commit c9cb013

Please sign in to comment.