ASoC: SOF: mediatek: Use str_on_off() helper function
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 4 Feb 2025 15:38:04 +0000 (16:38 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 5 Feb 2025 12:46:01 +0000 (12:46 +0000)
Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250204153806.3587-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/mediatek/mt8195/mt8195-clk.c

index 7cffcad00f9b796a6172e4122a8d9a5fb58e0389..2c2c4cd323fc6151a48485c254054ede815b164c 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <linux/clk.h>
 #include <linux/io.h>
+#include <linux/string_choices.h>
 #include "mt8195.h"
 #include "mt8195-clk.h"
 #include "../adsp_helper.h"
@@ -114,7 +115,7 @@ static int adsp_default_clk_init(struct snd_sof_dev *sdev, bool enable)
        struct adsp_priv *priv = sdev->pdata->hw_pdata;
        int ret;
 
-       dev_dbg(dev, "%s: %s\n", __func__, enable ? "on" : "off");
+       dev_dbg(dev, "%s: %s\n", __func__, str_on_off(enable));
 
        if (enable) {
                ret = clk_set_parent(priv->clk[CLK_TOP_ADSP],