From: Rob Herring <robh@kernel.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: devicetree@vger.kernel.org, Frank Rowand <frowand.list@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of: platform: Destroy child devices symmetrically
Date: Mon, 17 Aug 2020 15:53:50 -0600 [thread overview]
Message-ID: <20200817215350.GA1638282@bogus> (raw)
In-Reply-To: <20200806153650.3883530-1-thierry.reding@gmail.com>
On Thu, 06 Aug 2020 17:36:50 +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Iterate over child devices in reverse when unpopulating a platform
> device to make this step symmetrical with the population step. This
> fixes an issue in the Tegra DRM driver where upon module unload the
> DPAUX controller tries to unregister an I2C controller but will end
> up waiting indefinitely because one of the SOR devices is keeping a
> reference to it. Since the SOR devices are instantiated after the
> DPAUX devices, they would only be removed (and hence release their
> reference to the I2C controller) after the DPAUX devices have been
> removed.
>
> While destroying the child devices in reverse order helps in this
> situation, it isn't fully safe to do so either. An even better way
> would be for the child devices to be reordered to match the probe
> order, which would work irrespective of the instantiation order.
>
> However, reordering by probe order would be fairly complicated and
> doesn't fix any known issues, so we'll go with the simpler fix for
> now.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> drivers/of/platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied, thanks!
prev parent reply other threads:[~2020-08-17 21:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 15:36 [PATCH] of: platform: Destroy child devices symmetrically Thierry Reding
2020-08-17 21:53 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200817215350.GA1638282@bogus \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).