summaryrefslogtreecommitdiff
path: root/include/linux/string_helpers.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-11-05 15:42:24 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-11-18 19:40:08 +0300
commit418e0a3551bbef5b221705b0e5b8412cdc0afd39 (patch)
tree39e7d5c9c41662022115ba66fb470e993bc8153b /include/linux/string_helpers.h
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf (diff)
downloadlinux-418e0a3551bbef5b221705b0e5b8412cdc0afd39.tar.xz
lib/string_helpers: Introduce kasprintf_strarray()
We have a few users already that basically want to have array of sequential strings to be allocated and filled. Provide a helper for them (basically adjusted version from gpio-mockup.c). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/string_helpers.h')
-rw-r--r--include/linux/string_helpers.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index 4ba39e1403b2..f67a94013c87 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -100,6 +100,7 @@ char *kstrdup_quotable(const char *src, gfp_t gfp);
char *kstrdup_quotable_cmdline(struct task_struct *task, gfp_t gfp);
char *kstrdup_quotable_file(struct file *file, gfp_t gfp);
+char **kasprintf_strarray(gfp_t gfp, const char *prefix, size_t n);
void kfree_strarray(char **array, size_t n);
#endif