Re: More platform driver questions

From: Dmitry Torokhov
Date: Sun Dec 11 2005 - 19:41:20 EST


On Sunday 11 December 2005 17:10, Russell King wrote:
> > 2* Is it OK to tag platform_driver.probe and .remove __devinit and
> > __devexit, respectively?
>
> Yes, provided that you only have one platform device which is never
> removed independently of being a module or hotplug.

It just occured to me - every platform driver should rely on ->probe()
and ->remove() because now we have "bind" and "unbind" attributes and
there are talks about providing a method to disable automatic binding
of drivers across bus or even entire system. So even without hotplug
there possibility that user might want to disable device by unbinding
driver.

I think it pretty safe to mark them __devinit and __devexit because they
become noops if CONFIG_HOTPLUG is set. There is trouble with "bind" and
"unbind" sysfs attributes when CONFIG_HOTPLUG=N but Greg promised to fix
that.

--
Dmitry
-
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/