mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Acked-by: Rasmus Villemoes <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
8514c470dc
commit
0571967dfb
2 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue