[PATCH] ARM: config: update multi_v7_defconfig
Javier Martinez Canillas
javier at dowhile0.org
Thu Jul 17 15:49:36 PDT 2014
Hello Russell,
On Fri, Jul 18, 2014 at 12:44 AM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Fri, Jul 18, 2014 at 12:31:48AM +0200, Javier Martinez Canillas wrote:
>> In the case of the MAX77686, the mfd, regulator and clock drivers use
>> subsys_initcall() instead of module_init() but I wonder which of these
>> really need to be initialized at subsys init call time and which one
>> can just be built as a module.
>
> I think you're making a frequently made mistake concerning module
> initialisation.
>
> Having code initialised by subsys_initcall() (or indeed any other level)
> does not preclude it being a module:
>
> #ifndef MODULE
> ...
> #define subsys_initcall(fn) __define_initcall(fn, 4)
> ...
> #else /* MODULE */
> ...
> #define subsys_initcall(fn) module_init(fn)
> ...
> #endif
>
> So, subsys_initcall() automagically becomes module_init() when built
> as a module. There's no need to change anything here.
>
I was indeed confused, I should had looked at include/linux/init.h
before. Thanks a lot for the clarification.
Best regards,
Javier
More information about the linux-arm-kernel
mailing list