Commit 1f5d7ea7 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

lib/string_helpers: Add str_read_write() helper

Add str_read_write() helper to return 'read' or 'write' string literal.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDmitry Rokosov <ddrokosov@sberdevices.ru>
Link: https://lore.kernel.org/r/20220822175011.2886-2-ddrokosov@sberdevices.ruSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent c05c3e5d
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment