Re: [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()
From: Javier Martinez Canillas
Date: Fri Nov 07 2014 - 11:11:59 EST
Hello Krzysztof,
On 11/07/2014 04:23 PM, Krzysztof Kozlowski wrote:
>>
>> static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
>> - struct device_node *np)
>> + struct device_node *np,
>> + struct regulator_desc *desc)
>
> Not a const? Why not?
>
Right, I removed all your other mentions to the same issue but I'll double
check all the drivers to be sure that use const.
>> {
>> struct fan53555_platform_data *pdata;
>> int ret;
>> @@ -312,7 +313,7 @@ static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
>> if (!pdata)
>> return NULL;
>>
>> - pdata->regulator = of_get_regulator_init_data(dev, np);
>> + pdata->regulator = of_get_regulator_init_data(dev, np, desc);
>
> Desc would be always NULL here which is safe (check in patch 5/5) but if
> someone puts "regulator-initial-mode" in DTS then this will always print
> warning. Just wonder - is it actually what you wanted?
>
> This applies also for tps51632 and tps62360.
>
In an early version of the series I just passed NULL for all drivers but
Mark said that is more future proof to pass the descriptor and I agree.
I guess I should just remove the warning and only show an error if the
descriptor is not NULL and also the map mode function is defined but
the callback returns an error.
> (...)
>
> Rest looks fine.
>
Thanks a lot for the review.
> Krzysztof
>
>
Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/