* [PATCH] fpga: region: depopulate child devices on remove
@ 2026-09-28 1:15 Guanxin Li
2026-09-28 11:08 ` Xu Yilun
0 siblings, 1 reply; 3+ messages in thread
From: Guanxin Li @ 2026-09-28 1:15 UTC (permalink / raw)
To: Moritz Fischer, Xu Yilun, Tom Rix, Greg Kroah-Hartman, Alan Tull,
linux-fpga, linux-kernel
Cc: Guanxin Li
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fpga: region: depopulate child devices on remove
2026-09-28 1:15 [PATCH] fpga: region: depopulate child devices on remove Guanxin Li
@ 2026-09-28 11:08 ` Xu Yilun
0 siblings, 0 replies; 3+ messages in thread
From: Xu Yilun @ 2026-09-28 11:08 UTC (permalink / raw)
To: Guanxin Li
Cc: Moritz Fischer, Xu Yilun, Tom Rix, Greg Kroah-Hartman, Alan Tull,
linux-fpga, linux-kernel
On Mon, Sep 28, 2026 at 09:15:51AM +0800, Guanxin Li wrote:
> 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")
Does it need to get backport into stable tree?
> 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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] fpga: region: depopulate child devices on remove
@ 2026-09-21 13:18 Guanxin Li
0 siblings, 0 replies; 3+ messages in thread
From: Guanxin Li @ 2026-09-21 13:18 UTC (permalink / raw)
To: Moritz Fischer, Xu Yilun, Tom Rix, Alan Tull, Greg Kroah-Hartman,
linux-fpga, linux-kernel
Cc: Guanxin Li
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-28 11:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 1:15 [PATCH] fpga: region: depopulate child devices on remove Guanxin Li
2026-09-28 11:08 ` Xu Yilun
-- strict thread matches above, loose matches on Subject: below --
2026-09-21 13:18 Guanxin Li
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®