devres: add devm_kmalloc() and friends (managed memory allocators)
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 25 Jul 2015 12:52:36 +0000 (21:52 +0900)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Aug 2015 13:44:29 +0000 (07:44 -0600)
commit2b07f6859ad17b74ce490f371f4878add6ae5a11
tree506866b0d88d2ff24d87cecf26e8eb3da844e811
parent608f26c51bebc68db7f2edc7590ee513d2bc5465
devres: add devm_kmalloc() and friends (managed memory allocators)

devm_kmalloc() is identical to kmalloc() except that the memory
allocated with it is managed and will be automatically released
when the device is removed/unbound.

Likewise for the other variants.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/core/devres.c
include/dm/device.h