]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: stm: fix macro definition on STM_SAI_HAS_EXT_SYNC
authorHongbo Li <lihongbo22@huawei.com>
Wed, 21 Aug 2024 07:08:15 +0000 (15:08 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 29 Sep 2024 23:09:54 +0000 (01:09 +0200)
The macro STM_SAI_HAS_EXT_SYNC accepts a parameter x, but
it was not used, rather the variable sai was directly used,
which may be a local variable inside a function that calls
the macros.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240821070815.2326534-6-lihongbo22@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/stm/stm32_sai_sub.c

index 7bc4a96b7503f32ce4f365e458de55761b1530c7..a772bc8ea7be1819cffb72f693b3f46940c353f8 100644 (file)
@@ -53,7 +53,7 @@
 #define STM_SAI_PROTOCOL_IS_SPDIF(ip)  ((ip)->spdif)
 #define STM_SAI_HAS_SPDIF(x)   ((x)->pdata->conf.has_spdif_pdm)
 #define STM_SAI_HAS_PDM(x)     ((x)->pdata->conf.has_spdif_pdm)
-#define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4(sai->pdata))
+#define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4((x)->pdata))
 
 #define SAI_IEC60958_BLOCK_FRAMES      192
 #define SAI_IEC60958_STATUS_BYTES      24