On Fri, Dec 10, 2010 at 08:12:53AM +0100, Corentin Chary wrote:
> On Fri, Dec 10, 2010 at 1:08 AM, Dmitry Torokhov
> <dmitry.torok...@gmail.com> wrote:
> >
> > .remove is still needed but I guess Corentin refers to using
> > platform_driver_probe() instead of platform_driver_register() so the
> > megaware_probe can be marked __init and discarded after driver
> > initialization has been completed.
> 
> Also, register won't return any error code if the probe function failed,
> and the driver will be left in a strange state.
> 
> Calling directly platform_driver_probe() will return an error code.
> 
> But since it's a singleton device, and since the real "probe" code
> is already in the module_init function (wmi_has_guid()) call, using
> the probe callback to initialize data structures doesn't seems to make
> sense.
> 

What's the other option (provided that we want to keep platform device)?
Manual binding device and driver? I think platform_driver_probe() is
better tested and is safer, emits all necessary uevents. etc, etc.

I'd suggest platform_create_bundle() except I am not quite happy with
the API at the moment (needs to also accept drvdata I think).

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to