summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-07-17 02:27:52 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 18:26:44 -0700
commit75f2a4ead5d5890ada9c2663a70fb58613c0d9f2 (patch)
treea1eecedee8e357a88fb7a8ebdcf179946dbd5bc2 /include/linux/device.h
parent871379dc0fd9748892bdf10536f2664751a7819c (diff)
devres: Add devm_kasprintf and devm_kvasprintf API
devm_kasprintf() and devm_kvasprintf() are the managed counterparts for kasprintf() and kvasprintf(). Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index af424acd393d..34a24ce30620 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -605,6 +605,10 @@ extern int devres_release_group(struct device *dev, void *id);
/* managed devm_k.alloc/kfree for device drivers */
extern void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp);
+extern char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt,
+ va_list ap);
+extern char *devm_kasprintf(struct device *dev, gfp_t gfp,
+ const char *fmt, ...);
static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp)
{
return devm_kmalloc(dev, size, gfp | __GFP_ZERO);