diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:08 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:46 +0100 |
commit | e70b9d7a74698f1374244b2251216428db920aed (patch) | |
tree | b8091531241075d04501751b5236ab54afbe48c2 /arch/riscv | |
parent | 12763d0fe56899d3729d0e6755446ed7c740a88a (diff) | |
download | barebox-e70b9d7a74698f1374244b2251216428db920aed.tar.gz barebox-e70b9d7a74698f1374244b2251216428db920aed.tar.xz |
Rename device_d::device_node to device_d::of_node
Linux struct device has the member of_node for the device_node pointer.
Rename this in barebox accordingly to minimize the necessary changes
when porting Linux code. This was done with the semantic patch:
@@ struct device_d E; @@
- E.device_node
+ E.of_node
@@ struct device_d *E; @@
- E->device_node
+ E->of_node
Plus some manual adjustments.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/boards/riscvemu/board.c | 2 | ||||
-rw-r--r-- | arch/riscv/cpu/core.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv/boards/riscvemu/board.c b/arch/riscv/boards/riscvemu/board.c index d9c7bd77b8..e735d7e05e 100644 --- a/arch/riscv/boards/riscvemu/board.c +++ b/arch/riscv/boards/riscvemu/board.c @@ -43,7 +43,7 @@ static int riscvemu_probe(struct device_d *dev) u64 start; overlay = of_unflatten_dtb(__dtb_overlay_of_sram_start, INT_MAX); - of_overlay_apply_tree(dev->device_node, overlay); + of_overlay_apply_tree(dev->of_node, overlay); /* of_probe() will happen later at of_populate_initcall */ if (IS_ENABLED(CONFIG_CMD_TUTORIAL)) diff --git a/arch/riscv/cpu/core.c b/arch/riscv/cpu/core.c index c075301b1b..02b13ada4b 100644 --- a/arch/riscv/cpu/core.c +++ b/arch/riscv/cpu/core.c @@ -67,7 +67,7 @@ static int riscv_probe(struct device_d *parent) /* Each hart has a timer, but we only need one */ if (IS_ENABLED(CONFIG_RISCV_TIMER) && !timer_dev.parent) { timer_dev.id = DEVICE_ID_SINGLE; - timer_dev.device_node = parent->device_node; + timer_dev.of_node = parent->of_node; timer_dev.parent = parent; dev_set_name(&timer_dev, "riscv-timer"); @@ -78,7 +78,7 @@ static int riscv_probe(struct device_d *parent) if (IS_ENABLED(CONFIG_SERIAL_SBI) && !serial_sbi_dev.parent) { serial_sbi_dev.id = DEVICE_ID_SINGLE; - serial_sbi_dev.device_node = 0; + serial_sbi_dev.of_node = 0; serial_sbi_dev.parent = parent; dev_set_name(&serial_sbi_dev, "riscv-serial-sbi"); |