[PATCH 08/10] fpga: bridge: switch to using class_find_device_by_fwnode()

From: Dmitry Torokhov

Date: Sun Mar 22 2026 - 21:56:14 EST


In preparation to class_find_device_by_of_node() going away switch to
using class_find_device_by_fwnode().

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/fpga/fpga-bridge.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
index 8c275bd48a0d..3e04bb4341c7 100644
--- a/drivers/fpga/fpga-bridge.c
+++ b/drivers/fpga/fpga-bridge.c
@@ -9,6 +9,7 @@
#include <linux/idr.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -94,7 +95,8 @@ struct fpga_bridge *of_fpga_bridge_get(struct device_node *np,
struct fpga_bridge *bridge;
struct device *bridge_dev;

- bridge_dev = class_find_device_by_of_node(&fpga_bridge_class, np);
+ bridge_dev = class_find_device_by_fwnode(&fpga_bridge_class,
+ of_fwnode_handle(np));
if (!bridge_dev)
return ERR_PTR(-ENODEV);


--
2.53.0.959.g497ff81fa9-goog