diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2014-04-28 19:51:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-04-29 16:58:15 -0400 |
commit | 3046365bb470f0ec2f7cf5cb07a8ee7e4b490103 (patch) | |
tree | 66fbbb9b115c71814ff5a6e36566a47c492f0a6a /include/linux/device.h | |
parent | 37aa48368f2508defb1976be62e1ed6ca4dde683 (diff) |
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.h | 2 |
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, | |||
623 | } | 623 | } |
624 | extern void devm_kfree(struct device *dev, void *p); | 624 | extern void devm_kfree(struct device *dev, void *p); |
625 | extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp); | 625 | extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp); |
626 | extern void *devm_kmemdup(struct device *dev, const void *src, size_t len, | ||
627 | gfp_t gfp); | ||
626 | 628 | ||
627 | void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); | 629 | void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); |
628 | void __iomem *devm_request_and_ioremap(struct device *dev, | 630 | void __iomem *devm_request_and_ioremap(struct device *dev, |