aboutsummaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorBartosz Golaszewski2018-10-14 17:20:07 +0200
committerGreg Kroah-Hartman2018-10-16 12:53:27 +0200
commit0571967dfb5d2573c2a06871517d748932a899d1 (patch)
tree9f91e41a844cd43d2dd302132efe287789d89ddd /include/linux/device.h
parent8514c470dc18e58f27dee10a787175ef8f31162f (diff)
devres: constify p in devm_kfree()
Make devm_kfree() signature uniform with that of kfree(). To avoid compiler warnings: cast p to (void *) when calling devres_destroy(). Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 767cf1938b14..c2022c1daef6 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -694,7 +694,7 @@ static inline void *devm_kcalloc(struct device *dev,
{
return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO);
}
-extern void devm_kfree(struct device *dev, void *p);
+extern void devm_kfree(struct device *dev, const void *p);
extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp) __malloc;
extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
gfp_t gfp);