]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: cros_ec_codec: Use str_enable_disable() helper in wov_enable_put()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 20 Feb 2025 12:01:01 +0000 (13:01 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 24 Feb 2025 15:00:59 +0000 (15:00 +0000)
Remove hard-coded strings by using the str_enable_disable() helper
function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20250220120100.1530-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cros_ec_codec.c

index 11e7b3f6d410bb47f31eb0c2110cd7f08d39d46c..571222ec520cac5d56c80f179c323888e6d63a2d 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/platform_data/cros_ec_commands.h>
 #include <linux/platform_data/cros_ec_proto.h>
 #include <linux/platform_device.h>
+#include <linux/string_choices.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
@@ -657,7 +658,7 @@ static int wov_enable_put(struct snd_kcontrol *kcontrol,
                                           (uint8_t *)&p, sizeof(p), NULL, 0);
                if (ret) {
                        dev_err(priv->dev, "failed to %s wov\n",
-                               enabled ? "enable" : "disable");
+                               str_enable_disable(enabled));
                        return ret;
                }