[PATCH RFC v2 08/16] ARM: mxs: remove custom .init_time hook

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Thu Aug 29 07:32:33 EDT 2013


On 08/29/13 13:08, Shawn Guo wrote:
> On Tue, Aug 27, 2013 at 11:28:02PM +0200, Sebastian Hesselbarth wrote:
>> @@ -100,19 +101,17 @@ static enum imx23_clk clks_init_on[] __initdata = {
>>   	cpu, hbus, xbus, emi, uart,
>>   };
>>
>> -int __init mx23_clocks_init(void)
>> +static void __init mx23_clocks_init(struct device_node *np)
>>   {
>> -	struct device_node *np;
>>   	u32 i;
>>
>> +	clkctrl = of_iomap(np, 0);
>> +	WARN_ON(!clkctrl);
>> +
>>   	np = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
>>   	digctrl = of_iomap(np, 0);
>>   	WARN_ON(!digctrl);
>>
>> -	np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
>> -	clkctrl = of_iomap(np, 0);
>> -	WARN_ON(!clkctrl);
>> -
>
> With the changes, 'np' becomes a pointer to digctl node instead of
> clkctrl as the original.  This will cause problem for
> of_clk_add_provider(np, ...) later in this function.
>
> Same problem with mx28_clocks_init() changes.

Ok, will take care of it. I assume you are fine with having an extra
struct device_node pointer for the sake of readability instead of
reusing the same pointer.

Sebastian




More information about the linux-arm-kernel mailing list