Re: [PATCH] regulator: rk808: make better use of the gpiod API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 21, 2015 at 04:35:24PM +0200, Uwe Kleine-König wrote:
> On Tue, Jul 21, 2015 at 10:09:32PM +0900, Krzysztof Kozlowski wrote:

> > The function looks empty so it can be removed entirely.

> I assumed that not having a remove function makes the device not
> detachable. Not sure about that.

No, of course not - the remove function is completely optional.

> Looking at the code I found that not having a remove function can yield
> surprises, though. If your driver has a probe but no remove function the
> platform bus glue calls

> 	dev_pm_domain_attach(_dev, true);

> at probe time, but not

> 	dev_pm_domain_detach(_dev, true);

> at remove. I admit I don't know about that dev_pm_domain stuff, but it
> looks wrong to only have one but not the other. Greg?

That looks like a bug, yes.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux