summaryrefslogtreecommitdiffstats
path: root/include/linux/string_helpers.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-04-13 10:43:03 +0200
committerTakashi Iwai <tiwai@suse.de>2022-04-13 10:43:28 +0200
commit651a88798412e216f337d70181127e847f00a4b7 (patch)
tree5fefb107fa9b3fa74dcc3e7ce410c5a1d571549d /include/linux/string_helpers.h
parent1b6a6fc5280e97559287b61eade2d4b363e836f2 (diff)
parentbb06c203f86766fc2c37cbce0e20e9daae786f6e (diff)
downloadcachepc-linux-651a88798412e216f337d70181127e847f00a4b7.tar.gz
cachepc-linux-651a88798412e216f337d70181127e847f00a4b7.zip
Merge branch 'topic/cs35l41' into for-next
Pull CS35L41 codec updates Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/string_helpers.h')
-rw-r--r--include/linux/string_helpers.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index 7a22921c9db7..4d72258d42fd 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -106,4 +106,24 @@ void kfree_strarray(char **array, size_t n);
char **devm_kasprintf_strarray(struct device *dev, const char *prefix, size_t n);
+static inline const char *str_yes_no(bool v)
+{
+ return v ? "yes" : "no";
+}
+
+static inline const char *str_on_off(bool v)
+{
+ return v ? "on" : "off";
+}
+
+static inline const char *str_enable_disable(bool v)
+{
+ return v ? "enable" : "disable";
+}
+
+static inline const char *str_enabled_disabled(bool v)
+{
+ return v ? "enabled" : "disabled";
+}
+
#endif