lkml.org 
[lkml]   [2012]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging: Android: logger: module_exit implementationg
On 04/11/12 04:45, Luca Clementi wrote:
> On Fri, Nov 2, 2012 at 11:29 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>> On Thu, Nov 01, 2012 at 11:15:52PM -0700, Luca Clementi wrote:

<snip>

>>> + vfree(current_log->buffer);
>>> + kfree(current_log->misc.name);
>>> + kfree(current_log);
>>> + }
>>> +
>>> + return;
>>> +}
>>> +
>>> +
>>> +module_init(logger_init);
>>
>> Is module_init() the same "level" as device_initcall()? Did you test
>> this out in an Android system?
>
> Honestly I haven't tested it on Android, but in include/linux/init.h there is:
>
> #define module_init(x) __initcall(x);
> ...
> #define __initcall(fn) device_initcall(fn)
>
> Which lead me to think that there is not much difference between the two call.

The different initcalls run at different times. Often modules run with
something other than module_init if there are other dependencies on the
module/subsystem (see i2c core/busses for example). You would need to
check why logger was using device_initcall and make sure that it works
correctly (e.g. doesn't miss some early logs) in order to make this
change. It should be done as a separate patch anyway to make it easier
to identify any issues with it later.

~Ryan



\
 
 \ /
  Last update: 2012-11-05 01:41    [W:0.043 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site