summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorSrinivas Pandruvada2014-04-29 01:51:00 +0200
committerJonathan Cameron2014-04-29 22:58:15 +0200
commit3046365bb470f0ec2f7cf5cb07a8ee7e4b490103 (patch)
tree66fbbb9b115c71814ff5a6e36566a47c492f0a6a /include/linux/device.h
parentMerge 3.15-rc3 into staging-next (diff)
downloadkernel-qcow2-linux-3046365bb470f0ec2f7cf5cb07a8ee7e4b490103.tar.gz
kernel-qcow2-linux-3046365bb470f0ec2f7cf5cb07a8ee7e4b490103.tar.xz
kernel-qcow2-linux-3046365bb470f0ec2f7cf5cb07a8ee7e4b490103.zip
devres: introduce API "devm_kmemdup
Introduce devm_kmemdup, which uses resource managed kmalloc. There are several request from maintainers to add this instead of using kmemdup. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index d1d1c055b48e..ab871588da89 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -623,6 +623,8 @@ static inline void *devm_kcalloc(struct device *dev,
}
extern void devm_kfree(struct device *dev, void *p);
extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp);
+extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
+ gfp_t gfp);
void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
void __iomem *devm_request_and_ioremap(struct device *dev,