Re: Correct use of __init and __devinit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 24 Dec 2007 14:01:43 +0100
Sam Ravnborg <[email protected]> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux