[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC, PATCH] watchdog on gpio
On Mon, 14 Jan 2008 04:45:25 -0500
"Mike Frysinger" <> wrote:

> there is no hard requirement anywhere that says platform resources
> must be in the board resources file. marking the functions as __init
> instead of __devinit will basically cause a kernel crash if someone
> tries to use dynamic platform resources. there is no option that i'm
> aware of that prevents dynamic platform resources which means there is
> no way for the driver to say "i wont work with standard dynamic
> platform resources".

There is: platform_driver_probe(). It takes the probe function as a
parameter so that it can be left out of the platform_driver struct.
After it returns, there are no references to the probe function left
around, so if you call platform_driver_probe() instead of
platform_driver_register(), the probe function can be __init.

I agree that the driver is not safe in its current form.


 \ /
  Last update: 2008-01-14 13:17    [W:0.093 / U:7.972 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site