[U-Boot] [PATCH v4 3/5] devres: add devm_kmalloc() and friends (managed memory allocators)

Simon Glass sjg at chromium.org
Wed Jul 29 05:30:03 CEST 2015


On 25 July 2015 at 06:52, Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
> 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 at socionext.com>
> Acked-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2:
>   - Rip off "extern" from the func declarations
>   - Add comments in headers
>   - Add devm_kfree()
>   - Do not force devm_kmalloc() zero-filling
>
>  drivers/core/devres.c | 34 ++++++++++++++++++++++++++++++++++
>  include/dm/device.h   | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 78 insertions(+)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list