Messages in this thread | | | Date | Wed, 26 Dec 2007 23:50:12 +0100 | From | Haavard Skinnemoen <> | Subject | Re: Correct use of __init and __devinit |
| |
On Mon, 24 Dec 2007 14:01:43 +0100 Sam Ravnborg <sam@ravnborg.org> wrote:
> So of the principle of least suprise it is best to use __devinit > for the probe function as most other drivers do. And if > the driver model happens to call your probe function after > init time then we will not oops.
If you're dealing with platform_devices, you can use platform_driver_probe() and remove the probe() function from the platform_driver struct to ensure this never happens.
This is only ok for non-hotpluggable devices, of course.
Haavard
| |