I have just been preparing a patch for parport_pc.c
and had the unpleasant experience of having to decide
whether certain functions should be tagged "__init" or
"__devinit", etc. I assume that if I incorrectly label
a function "__init" then an oops will result when the
function is called after init time; and if I incorrectly
fail to label a function with "__init" then it will be dead
code after init time. Similarly, if I incorrectly label
a function "__devinit" then an oops will result when the
function is called after init time (unless the driver is
compiled with HOTPLUG); and if I incorrectly fail to label
a function with "__devinit" then it will be dead code
after init time (unless the driver is compiled with HOTPLUG,
in which case __devinit makes no difference).
Would it not be possible for this to be handled automatically?
That is, would it not be possible to set things up so that we
tag just the module init function with '__init' and all
those functions (that aren't exported) called only by __init
functions will automatically be treated as __init functions
too? And similarly with __devinit functions? Thoughts?
--
Thomas Hood