Re: section mismatch with a platform driver

From: Randy Dunlap
Date: Mon Oct 13 2008 - 12:32:20 EST


Neshama Parhoti wrote:
> On Mon, Oct 13, 2008 at 6:01 PM, Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:
>> A probe function can be called at any time -- i.e., after system init
>> has completed, so discarding the __init function my_probe_func() is BAD,
>> dangerous, BUGgy.
>
> Thanks for the explanation!
>
> Does that mean that all drivers with __init in their probe functions are bogus ?

It depends. If your platform doesn't support hotplug, then it's possible
that the probe function is only called during system init, so it would be OK.

And in general, if a kernel is built without hotplug support, then the
__init probe functions are probably safe. But I'm not sure about it.

--
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/