]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: tscs454: Use str_enable_disable() in pll_power_event()
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 10 Feb 2025 11:59:37 +0000 (12:59 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 10 Feb 2025 13:42:10 +0000 (13:42 +0000)
Remove hard-coded strings by using the str_enable_disable() helper
function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250210115937.53654-1-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tscs454.c

index 850e5de9271ed64faff44f9872c0b43bc4a829d1..da2f3cb1cd130598e98b7b15dfa56110f907e818 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/i2c.h>
 #include <linux/err.h>
 #include <linux/string.h>
+#include <linux/string_choices.h>
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/mutex.h>
@@ -737,9 +738,7 @@ static int pll_power_event(struct snd_soc_dapm_widget *w,
        ret = snd_soc_component_update_bits(component, R_PLLCTL, msk, val);
        if (ret < 0) {
                dev_err(component->dev, "Failed to %s PLL %d  (%d)\n",
-                               enable ? "enable" : "disable",
-                               pll1 ? 1 : 2,
-                               ret);
+                       str_enable_disable(enable), pll1 ? 1 : 2, ret);
                return ret;
        }