Map the PPC4xx GPIO register block through the platform device
resource instead of reparsing the firmware node directly.

The GPIO node now probes as a platform device, so use the
platform helper to keep resource handling aligned with the converted
driver model and to report mapping failures with the platform device
context.

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <[email protected]>
---
 arch/powerpc/platforms/44x/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/44x/gpio.c 
b/arch/powerpc/platforms/44x/gpio.c
index 2bc5cc260894..4d5176aa6895 100644
--- a/arch/powerpc/platforms/44x/gpio.c
+++ b/arch/powerpc/platforms/44x/gpio.c
@@ -182,7 +182,7 @@ static int ppc4xx_gpio_probe(struct platform_device *ofdev)
        if (!gc->label)
                return -ENOMEM;
 
-       chip->regs = devm_of_iomap(dev, np, 0, NULL);
+       chip->regs = devm_platform_ioremap_resource(ofdev, 0);
        if (IS_ERR(chip->regs))
                return PTR_ERR(chip->regs);
 
-- 
2.54.0


Reply via email to