summaryrefslogtreecommitdiffstats
path: root/arch/sandbox
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-04 19:59:03 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-05 16:28:05 +0100
commit29d0e0522828464bedae34fd73e050eac561edc0 (patch)
treee229555b58d5649d3ffa7e55c5f6018202012dae /arch/sandbox
parent2285dd1e4f193ada5bdabc23e5935b15fbd0a886 (diff)
downloadbarebox-29d0e0522828464bedae34fd73e050eac561edc0.tar.gz
barebox-29d0e0522828464bedae34fd73e050eac561edc0.tar.xz
cdev: implement setter/getter for cdev device node
A cdev has two device tree node pointers, one directly at struct cdev.device_node and another indirectly via cdev.dev->device_node. We may want to remove cdev::device_node in future, but till then to avoid users having to guess, which device_node is the correct one, add a helper to set and get the device tree node. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-19-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/board/hostfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c
index 225617fe91..88d4d6605f 100644
--- a/arch/sandbox/board/hostfile.c
+++ b/arch/sandbox/board/hostfile.c
@@ -153,7 +153,7 @@ static int hf_probe(struct device *dev)
cdev = is_blockdev ? &priv->blk.cdev : &priv->cdev;
- cdev->device_node = np;
+ cdev_set_of_node(cdev, np);
if (is_blockdev) {
cdev->name = np->name;