devres: provide devm_krealloc()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 24 Aug 2020 17:38:57 +0000 (19:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Sep 2020 11:32:06 +0000 (13:32 +0200)
commitf82485722e5de5ebb08d3a1dd7302203346dbff9
tree66114964163c5ce91e43c99e4cbc0f4b6eebfaa0
parent81b142245b6f0249896325c7e8451cb5347d4d31
devres: provide devm_krealloc()

Implement the managed variant of krealloc(). This function works with
all memory allocated by devm_kmalloc() (or devres functions using it
implicitly like devm_kmemdup(), devm_kstrdup() etc.).

Managed realloc'ed chunks can be manually released with devm_kfree().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200824173859.4910-2-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/driver-api/driver-model/devres.rst
drivers/base/devres.c
include/linux/device.h