Re: [PATCH] devexit fixes in i82092.c

Keith Owens
2002-03-16T09:50:55Z

On Sat, 16 Mar 2002 00:13:21 -0800 (PST),
Linus Torvalds <torvalds@transmeta.com> wrote:
>On Sat, 16 Mar 2002, Keith Owens wrote:
>>
>> Does that mean that we also get rid of the initcall methods? If
>> shutdown follows a device tree then startup should also use that tree.
>
>You cannot _build_ the tree without the initcall methods - it's populating
>the tree that the initcalls mostly do, after all.

Confusion of names. I read 'device tree' and thought you were talking
about an initialization tree that was built from PCI and USB data,
independent of kernel link order. If your 'device tree' is just the
existing initcall list derived from $(obj-y) then I agree that we
should bot have separate shutdown functions. module_exit should be
retained for objects that are built into the kernel and the shutdown
code should run the module_exit functions in reverse order to
initialization.

The question of separating register and probe is independent of the
above. It is definitely a good idea to separate register and probe, if
only to avoid all the existing races on module unload (using
__this_module and mod_inc_count everywhere in mainline code is not a
perfect solution).