diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-06 22:55:42 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-06-12 20:14:21 +0300 |
commit | fca76071bab2304b379c35674d3b9e36a82e364a (patch) | |
tree | 4a2404804a55fc24ff3b09bc222e031aad76f5c3 /include/linux/string_helpers.h | |
parent | 27896ffd8fe41a6f052962c2fb1573daa6476f13 (diff) | |
download | linux-fca76071bab2304b379c35674d3b9e36a82e364a.tar.xz |
lib/string_helpers: Split out string_choices.h
Some users may only need the string choice APIs. Split
the respective header, i.e. string_choices.h. Include
it in the string_helpers.h for backward compatibility.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'include/linux/string_helpers.h')
-rw-r--r-- | include/linux/string_helpers.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index fae6beaaa217..789ab30045da 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h @@ -4,6 +4,7 @@ #include <linux/bits.h> #include <linux/ctype.h> +#include <linux/string_choices.h> #include <linux/string.h> #include <linux/types.h> @@ -113,29 +114,4 @@ 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"; -} - -static inline const char *str_read_write(bool v) -{ - return v ? "read" : "write"; -} - #endif |