Thread (61 messages) 61 messages, 10 authors, 2025-07-22
STALE360d
Revisions (6)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]

[PATCH v3 06/28] driver core: fw_devlink: Introduce fw_devlink_set_device()

From: Herve Codina <herve.codina@bootlin.com>
Date: 2025-06-13 13:49:00
Also in: imx, linux-acpi, linux-clk, linux-cxl, linux-devicetree, linux-i2c, linux-pci, linux-spi, lkml
Subsystem: acpi, driver core, kobjects, debugfs and sysfs, software nodes and device properties, the rest · Maintainers: "Rafael J. Wysocki", Greg Kroah-Hartman, Danilo Krummrich, Linus Torvalds

Setting fwnode->dev is specific to fw_devlink.

In order to avoid having a direct 'fwnode->dev = dev;' in several
place in the kernel, introduce fw_devlink_set_device() helper to perform
this operation.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 include/linux/fwnode.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
index a921ca2fe940..a1345e274125 100644
--- a/include/linux/fwnode.h
+++ b/include/linux/fwnode.h
@@ -231,4 +231,10 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);
 void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode);
 bool fw_devlink_is_strict(void);
 
+static inline void fw_devlink_set_device(struct fwnode_handle *fwnode,
+					 struct device *dev)
+{
+	fwnode->dev = dev;
+}
+
 #endif
-- 
2.49.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help