On 23 July 2015 at 00:17, Masahiro Yamada <yamada.masah...@socionext.com> wrote:
> Currently, Devres requires additional 16 byte for each allocation,
> which is not so insignificant in some cases.
>
> Add CONFIG_DEVRES to make this framework optional.
> If the option is disabled, devres functions fall back to
> non-managed variants.  For example, devres_alloc() to kzalloc(),
> devm_kmalloc() to kmalloc(), etc.
>
> Because devres_head is also surrounded by the ifdef conditional,
> there is no memory overhead when CONFIG_DEVRES is disabled.
>
> Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com>
> Suggested-by: Simon Glass <s...@chromium.org>
> ---
>
> Changes in v3:
>   - Introduce CONFIG_DEVRES
>   - Surround devres_head member with ifdef CONFIG_DEVRES
>
> Changes in v2: None
>
>  drivers/core/Kconfig         | 14 +++++++-
>  drivers/core/Makefile        |  3 +-
>  drivers/core/device.c        |  2 ++
>  include/dm/device-internal.h | 13 +++++++
>  include/dm/device.h          | 86 
> ++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 116 insertions(+), 2 deletions(-)

Acked-by: Simon Glass <s...@chromium.org>
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to