Re: [PATCH 1/2] mfd: core: Add the option to order destruction of MFD cells

From: Mark Brown
Date: Tue Jun 03 2014 - 06:51:03 EST


On Tue, Jun 03, 2014 at 10:49:32AM +0100, Charles Keepax wrote:
> On Mon, Jun 02, 2014 at 10:01:17PM +0100, Mark Brown wrote:

> > Probe deferral is supposed to handle removal too, we're supposed to be
> > able to walk the device list in reverse order and everything just work.

> I had considered this approach but was perhaps incorrectly too
> nervous about it. I was slightly concerned about breaking other
> MFD devices by changing the order things destroy in. Also the way

It seems vastly more likely that there's other drivers out there with
poorly tested removal paths than drivers relying on the current
behaviour.

> the child devices are iterated with device_for_each_child, there is
> lack of helpers to process the klist in reverse and it felt like
> code I probably shouldn't be modifying.

> I am happy to do a version that removes devices in reverse probe
> order, if that is preferrable? But any pointers if I am missing
> the obvious way to do that would be appreciated.

You probably need to write the helpers but I'd expect they should be
relatively straightforward.

Attachment: signature.asc
Description: Digital signature