Skip to content

Commit aea7096

Browse files
committed
of: reserved_mem: Add missing IORESOURCE_MEM flag on resources
Commit f4fcfdd ('of: reserved_mem: Add functions to parse "memory-region"') failed to set IORESOURCE_MEM flag on the resources. The result is functions such as devm_ioremap_resource_wc() will fail. Add the missing flag. Fixes: f4fcfdd ('of: reserved_mem: Add functions to parse "memory-region"') Reported-by: Iuliana Prodan <[email protected]> Reported-by: Daniel Baluta <[email protected]> Tested-by: Iuliana Prodan <[email protected]> Reviewed-by: Iuliana Prodan <[email protected]> Reviewed-by: Saravana Kannan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent c81f6ce commit aea7096

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/of/of_reserved_mem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ int of_reserved_mem_region_to_resource(const struct device_node *np,
771771
return -EINVAL;
772772

773773
resource_set_range(res, rmem->base, rmem->size);
774+
res->flags = IORESOURCE_MEM;
774775
res->name = rmem->name;
775776
return 0;
776777
}

0 commit comments

Comments
 (0)