lib/string_helpers: Add str_read_write() helper

Add str_read_write() helper to return 'read' or 'write' string literal.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Link: https://lore.kernel.org/r/20220822175011.2886-2-ddrokosov@sberdevices.ru
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Andy Shevchenko 2022-08-22 17:49:23 +00:00 committed by Jonathan Cameron
parent c05c3e5d4e
commit 1f5d7ea73c

View File

@ -126,4 +126,9 @@ 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