[U-Boot] [PATCH 1/2 v3] fdt: Add a do_fixup_by_path_string() function

Chunhe Lan b25806 at freescale.com
Mon Aug 29 04:54:53 CEST 2011


On Mon, 29 Aug 2011 02:15:15 +0800, Kumar Gala <kumar.gala at freescale.com>  
wrote:

>
> On Aug 17, 2011, at 1:24 AM, Chunhe Lan wrote:
>
>> The do_fixup_by_path_string() will set the specified
>> node's property to the value contained in "status".
>> It would just be a wrapper for do_fixup_by_path()
>> that calls strlen on the argument.
>>
>
> Fix where you break the line, should like more like (use upto 75 chars  
> per line):

     OK.

    Thanks.

    -Jack Lan

>     The do_fixup_by_path_string() will set the specified node's property  
> to the
>     value contained in "status".  It would just be a wrapper for
>     do_fixup_by_path() that calls strlen on the argument.
>
>
>> Signed-off-by: Chunhe Lan <Chunhe.Lan at freescale.com>
>> ---
>> include/fdt_support.h |    7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/fdt_support.h b/include/fdt_support.h
>> index 863024f..1de4a1d 100644
>> --- a/include/fdt_support.h
>> +++ b/include/fdt_support.h
>> @@ -36,6 +36,13 @@ void do_fixup_by_path(void *fdt, const char *path,  
>> const char *prop,
>> 		      const void *val, int len, int create);
>> void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop,
>> 			  u32 val, int create);
>> +
>> +static inline void do_fixup_by_path_string(void *fdt, const char *path,
>> +					   const char *prop, const char *status)
>> +{
>> +	do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1);
>> +}
>> +
>> void do_fixup_by_prop(void *fdt,
>> 		      const char *pname, const void *pval, int plen,
>> 		      const char *prop, const void *val, int len,
>> --
>> 1.5.6.5
>



More information about the U-Boot mailing list