From: Guanxin Li <bruceli20040604@gmail.com>
To: Moritz Fischer <mdf@kernel.org>, Xu Yilun <yilun.xu@intel.com>,
Tom Rix <trix@redhat.com>,
Alan Tull <atull@opensource.altera.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Guanxin Li <bruceli20040604@gmail.com>
Subject: [PATCH] fpga: region: depopulate child devices on remove
Date: Mon, 21 Sep 2026 21:18:57 +0800 [thread overview]
Message-ID: <20260921131857.3619997-1-bruceli20040604@gmail.com> (raw)
of_fpga_region_probe() populates child platform devices under the FPGA
region using of_platform_populate(), but the remove path does not
depopulate them before unregistering the region.
Call of_platform_depopulate() before unregistering the FPGA region so
that the child devices are properly unregistered and their references
are released.
Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA")
Signed-off-by: Guanxin Li <bruceli20040604@gmail.com>
---
drivers/fpga/of-fpga-region.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c
index 9107a5b461d3..fd3f81db0385 100644
--- a/drivers/fpga/of-fpga-region.c
+++ b/drivers/fpga/of-fpga-region.c
@@ -429,6 +429,7 @@ static void of_fpga_region_remove(struct platform_device *pdev)
struct fpga_region *region = platform_get_drvdata(pdev);
struct fpga_manager *mgr = region->mgr;
+ of_platform_depopulate(®ion->dev);
fpga_region_unregister(region);
fpga_mgr_put(mgr);
}
--
2.43.0
next reply other threads:[~2026-09-21 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 13:18 Guanxin Li [this message]
2026-09-28 1:15 Guanxin Li
2026-09-28 11:08 ` Xu Yilun
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=20260921131857.3619997-1-bruceli20040604@gmail.com \
--to=bruceli20040604@gmail.com \
--cc=atull@opensource.altera.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.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
all inboxes | Powered by JetHome®