lkml.org 
[lkml]   [2022]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/4] of: add of_property_alloc/free() and of_node_alloc()
Date
In order to be able to create new nodes and properties dynamically from
drivers, add of_property_alloc/free() and of_node_alloc(). These
functions can be used to create new nodes and properties flagged with
OF_DYNAMIC and to free them.

Some powerpc code was already doing such operations and thus, these
functions have been used to replace the manual creation of nodes and
properties.

---

Changes in V2:
- Remove of_node_free()
- Rework property allocation to allocate both property and value with
1 allocation
- Rework node allocation to allocate name at the same time the node is
allocated
- Remove extern from definitions
- Remove of_property_alloc() value_len parameter and add more
explanation for the arguments
- Add a check in of_property_free to check OF_DYNAMIC flag
- Add a commit which constify the property argument of
of_property_check_flags()

Clément Léger (4):
of: constify of_property_check_flags() prop argument
of: dynamic: add of_property_alloc() and of_property_free()
of: dynamic: add of_node_alloc()
powerpc/pseries: use of_property_alloc/free() and of_node_alloc()

arch/powerpc/platforms/pseries/dlpar.c | 51 +------
.../platforms/pseries/hotplug-memory.c | 21 +--
arch/powerpc/platforms/pseries/reconfig.c | 45 ++----
drivers/of/dynamic.c | 134 ++++++++++++------
drivers/of/of_private.h | 21 ++-
include/linux/of.h | 25 +++-
6 files changed, 153 insertions(+), 144 deletions(-)

--
2.36.0

\
 
 \ /
  Last update: 2022-06-01 10:22    [W:0.097 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site