[PATCH V2 3/5] of: introduce of_parse_phandle_with_fixed_args

Stephen Warren swarren at wwwdotorg.org
Mon Jul 15 19:06:38 EDT 2013


On 07/15/2013 12:59 PM, Sergei Shtylyov wrote:
> On 07/15/2013 10:40 PM, Stephen Warren wrote:
> 
>> From: Stephen Warren <swarren at nvidia.com>
> 
>> This is identical to of_parse_phandle_with_args(), except that the
>> number of argument cells is fixed, rather than being parsed out of the
>> node referenced by each phandle.

>> diff --git a/drivers/of/base.c b/drivers/of/base.c
>> index 23e7073..ad799d9 100644
>> --- a/drivers/of/base.c
>> +++ b/drivers/of/base.c
>> @@ -1106,7 +1106,8 @@ EXPORT_SYMBOL(of_parse_phandle);
>>
>>   static int __of_parse_phandle_with_args(const struct device_node *np,
>>                       const char *list_name,
>> -                    const char *cells_name, int index,
>> +                    const char *cells_name,
>> +                    int cells_count, int index,
> 
>    The correct grammar would be 'cell_name' and 'cell_count' I think.

I guess I can see the argument for cell_count, but "cells_name" is named
based on the DT property named "gpio-cells", so "cells" seems correct
here (and is a pre-existing issue anyway).

I'll fix up cell_count and the brace issue locally, but hold off reposting.



More information about the linux-arm-kernel mailing list