diff mbox series

[2/2] block: partitions: of: assign Device Tree node to partition

Message ID c0b234511303c2efbbff336ed4d5bb993b54f16b.1741107851.git.daniel@makrotopia.org (mailing list archive)
State New
Headers show
Series [1/2] block: allow setting partition of_node | expand

Checks

Context Check Description
shin/vmtest-linus-master-PR success PR summary
shin/vmtest-linus-master-VM_Test-0 success Logs for build-kernel

Commit Message

Daniel Golle March 4, 2025, 5:06 p.m. UTC
Assign partition of_node so other drivers are able to identify a
partition by its Device Tree node.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 block/partitions/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/block/partitions/of.c b/block/partitions/of.c
index 4e760fdffb3fe..8b82f9f396866 100644
--- a/block/partitions/of.c
+++ b/block/partitions/of.c
@@ -48,7 +48,7 @@  static void add_of_partition(struct parsed_partitions *state, int slot,
 	u64 offset = of_read_number(reg, a_cells) / SECTOR_SIZE;
 	u64 size = of_read_number(reg + a_cells, s_cells) / SECTOR_SIZE;
 
-	put_partition(state, slot, offset, size);
+	of_put_partition(state, slot, offset, size, np);
 
 	if (of_property_read_bool(np, "read-only"))
 		state->parts[slot].flags |= ADDPART_FLAG_READONLY;