audioreach-driver: use dev_set_dma_coherent() in q6apm probe#66
Merged
Conversation
aiyapate
force-pushed
the
compilation_fix
branch
from
July 15, 2026 07:56
98c1258 to
6ee9e87
Compare
sauravk-git
approved these changes
Jul 15, 2026
Wrap dma_coherent handling behind AR_SET_DMA_COHERENT().
For kernel >= 7.2.0, use dev_set_dma_coherent(dev).
For older kernels, keep dev->dma_coherent = true.
This fixes build failures on newer kernels where struct
device no longer exposes dma_coherent as a direct field
("no member named dma_coherent"), while keeping older
kernel compatibility.
Signed-off-by: Aiyaz Patel <aiyapate@qti.qualcomm.com>
aiyapate
force-pushed
the
compilation_fix
branch
from
July 15, 2026 09:28
6ee9e87 to
f78a925
Compare
quic-aditrath
approved these changes
Jul 15, 2026
qti-sbojja
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a small compatibility wrapper for DMA coherent handling in audioreach-driver by introducing AR_SET_DMA_COHERENT(dev) in ar_kcompat.h and using it in q6apm_audio_mem_probe(). For kernel >= 7.2.0, it calls dev_set_dma_coherent(dev); for older kernels, it keeps the legacy dev->dma_coherent = true behavior.
The goal is to fix newer-kernel build failures (struct device no longer has direct dma_coherent field access) while preserving compatibility and behavior on older kernels.