Skip to content
Commit 0b58eaa8 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

dm: core: Allow copying ofnode property data when writing



At present ofnode_write_prop() is inconsistent between livetree and
flattree, in that livetree requires the caller to ensure the property
value is stable (e.g. in rodata or allocated) but flattree does not, since
it makes a copy.

This makes the API call a bit painful to use, since the caller must do
different things depending on OF_LIVE.

Add a new 'copy' argument which tells the function to make a copy if
needed. Add some tests to cover this behaviour.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 0d63213c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment