Skip to contentSkip to conversation

powerpc/44x: Use platform resource helper for GPIO MMIO

PATCH New Rosen Penev 1 participant 1 message May 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/44x: Use platform resource helper for GPIO MMIO

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
---
 arch/powerpc/platforms/44x/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/44x/gpio.c +1 -1
index 2bc5cc260894..4d5176aa6895 100644
@@ -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);
 
Signature · 1 line
2.54.0