[PATCH 1/2] power: act8945a: add charger driver for ACT8945A

Krzysztof Kozlowski k.kozlowski at samsung.com
Thu Jan 7 23:02:45 PST 2016


On 08.01.2016 15:43, Yang, Wenyou wrote:

[...]

>>> +static struct platform_driver act8945a_charger_driver = {
>>> +       .driver = {
>>> +               .name = "act8945a-charger",
>>> +       },
>>> +       .probe  = act8945a_charger_probe,
>>> +       .remove = act8945a_charger_remove, };
>>> +
>>> +static int __init act8945a_charger_init(void) {
>>> +       return platform_driver_register(&act8945a_charger_driver);
>>> +}
>>> +subsys_initcall(act8945a_charger_init);
>>
>> Why subsys_initcall? This should be regular module_platform_driver.
> 
> I want it to register early enough as MFD.  Maybe I am wrong.

No, you shouldn't manually order the probing by initcalls. This should
be registered as usual and, if needed, support deferred probing. In this
case I even can't find any reason to register it earlier than usual.


Best regards,
Krzysztof




More information about the linux-arm-kernel mailing list