summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-01-13 18:25:27 +0300
committerMark Brown <broonie@kernel.org>2023-01-13 18:25:27 +0300
commit497f134a912af5594a519eb1d226a13f54cb9fa5 (patch)
treee74f7957b3880274fe36153a813e3480866d5144 /sound/soc
parent8f28299f5cdcc6e7b6ed664364d1c76821896d07 (diff)
parent4a1b1b65e410df82add3c5bc5be7bfb0c62f7f73 (diff)
downloadlinux-497f134a912af5594a519eb1d226a13f54cb9fa5.tar.xz
Fixes for avs driver
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>: First patch fixes problems reported when performing shutdown. Second one is for a problem reported by LKP. Last one fixes problem reported by checkpatch.
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/intel/avs/topology.c2
-rw-r--r--sound/soc/intel/avs/trace.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c
index 5fee7a8ec06a..cdb4ec500261 100644
--- a/sound/soc/intel/avs/topology.c
+++ b/sound/soc/intel/avs/topology.c
@@ -1633,7 +1633,7 @@ avs_control_load(struct snd_soc_component *comp, int index, struct snd_kcontrol_
size_t block_size;
int ret;
- switch (hdr->type) {
+ switch (le32_to_cpu(hdr->type)) {
case SND_SOC_TPLG_TYPE_MIXER:
tmc = container_of(hdr, typeof(*tmc), hdr);
tuples = tmc->priv.array;
diff --git a/sound/soc/intel/avs/trace.c b/sound/soc/intel/avs/trace.c
index fcb7cfc823d6..c63eea909b5e 100644
--- a/sound/soc/intel/avs/trace.c
+++ b/sound/soc/intel/avs/trace.c
@@ -24,7 +24,7 @@ void trace_avs_msg_payload(const void *data, size_t size)
while (remaining > 0) {
u32 chunk;
- chunk = min(remaining, (size_t)MAX_CHUNK_SIZE);
+ chunk = min_t(size_t, remaining, MAX_CHUNK_SIZE);
trace_avs_ipc_msg_payload(data, chunk, offset, size);
remaining -= chunk;