>> Doesn't look serious.  init_module() is not __init, but it calls
>> some __init functions and touches some __initdata.
>
>This is the typical case with inconsistent tagging.
>
Worse yet, I once experienced a double-definition error, that is, I had

  __init int init_module(void)  {
      /* module1 */
  }

and, in another .c file,

  __init int init_module(void) {
      /* module2 */
  }

and making them both CONFIG_...=y gave a typical double-definition link 
time error in vmlinux. The proper way (IMO) is

  static __init int blah_init(void) { ... }
  module_init(blah_init);

Then it does not even matter if blah_init is defined in two different 
modules.

>>  
>> -int init_module(void)
>> +int __init init_module(void)
>>  {
>>      int this_dev, found = 0;
>
>When you anyway touches the driver I suggest to name the function
><module>_init, <module>_cleanup and use module_init(), module_cleanup().


Jan Engelhardt
-- 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to