mirror of
https://github.com/torvalds/linux
synced 2024-10-07 20:05:15 +00:00
power: reset: syscon-poweroff: get regmap from parent node
Just like syscon-reboot device, the syscon-poweroff is supposed to be a child of syscon node, thus we can take the same approach as syscon-poweroff: deprecate the 'regmap' field in favor of taking it from the parent's node. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230901120057.47018-3-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
6f9c8a1338
commit
92bbb93aaa
|
@ -37,8 +37,11 @@ static int syscon_poweroff_probe(struct platform_device *pdev)
|
|||
|
||||
map = syscon_regmap_lookup_by_phandle(dev->of_node, "regmap");
|
||||
if (IS_ERR(map)) {
|
||||
dev_err(dev, "unable to get syscon");
|
||||
return PTR_ERR(map);
|
||||
map = syscon_node_to_regmap(dev->parent->of_node);
|
||||
if (IS_ERR(map)) {
|
||||
dev_err(dev, "unable to get syscon");
|
||||
return PTR_ERR(map);
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_u32(dev->of_node, "offset", &offset)) {
|
||||
|
|
Loading…
Reference in a new issue