summaryrefslogtreecommitdiff
path: root/drivers/base/devres.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <brgl@bgdev.pl>2018-10-14 17:20:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-16 12:53:27 +0200
commit0571967dfb5d2573c2a06871517d748932a899d1 (patch)
tree9f91e41a844cd43d2dd302132efe287789d89ddd /drivers/base/devres.c
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 'drivers/base/devres.c')
-rw-r--r--drivers/base/devres.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index f98a097e73f2..438c91a43508 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -885,11 +885,12 @@ EXPORT_SYMBOL_GPL(devm_kasprintf);
*
* Free memory allocated with devm_kmalloc().
*/
-void devm_kfree(struct device *dev, void *p)
+void devm_kfree(struct device *dev, const void *p)
{
int rc;
- rc = devres_destroy(dev, devm_kmalloc_release, devm_kmalloc_match, p);
+ rc = devres_destroy(dev, devm_kmalloc_release,
+ devm_kmalloc_match, (void *)p);
WARN_ON(rc);
}
EXPORT_SYMBOL_GPL(devm_kfree);