Re: [PATCH] of/platform: depopulate devices in the reverse order of creation

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

 




On Mon, Dec 12, 2016 at 12:39 PM, Jason Gunthorpe
<jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote:
> If the DT has inter-dependencies, then the devices need to be removed
> in the right order to avoid removal problems.
>
> Assuming the DT is constructed so that EPROBE_DEFER doesn't happen
> during creating then a good way to avoid removal problems is reversing
> the order during depopulation.

I assume you mean by sorting the nodes to get lucky with the init
order. Not sure I want any patches that help that. I'm tempted to
randomize the device creation order instead.

> Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/of/platform.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> In my specific case I have a gpio driver, followed by a i2c bitbang
> using that driver. So gpiolib prints an error if it the gpio driver is
> removed before the gpio client..

Good news, functional dependencies are going into 4.10. Let's fix GPIO
and use that.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux