lkml.org 
[lkml]   [2007]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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


\
 
 \ /
  Last update: 2007-12-26 23:53    [W:0.117 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site