tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pmf(9) clarifications
On Thu, 5 Apr 2012, David Young wrote:
> On Wed, Apr 04, 2012 at 07:25:55AM +0100, Iain Hibbert wrote:
> > Hi
> >
> > Regarding pmf(9) API, is it safe to call pmf_device_deregister() if the
> > device was not successfully registered as a power handler? The
> > documentation does not mention this (though the code looks as if that
> > would work fine), nor the device_pmf_is_registered() function which may
> > not be actually required? Some driver detach functions use it and some do
> > not..
>
> I think that drivers should never call device_pmf_is_registered(), but
> sometimes they do anyway.
Well, not any more I cleaned them all up
> I don't know if it's safe to pmf_device_deregister() if you haven't
> successfully pmf_device_register()'d, but it seems that config_detach()
> could help drivers out with the de-registration.
On the one hand it is nice to see symmetry (register during attach,
deregister during detach) but yes, config_detach() could just handle it
internally..
regards,
iain
Home |
Main Index |
Thread Index |
Old Index