OSDN Git Service

pinctrl: starfive: Move PM device over to irq domain
authorMarc Zyngier <maz@kernel.org>
Tue, 1 Feb 2022 12:03:09 +0000 (12:03 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Feb 2022 11:07:04 +0000 (11:07 +0000)
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-12-maz@kernel.org
drivers/pinctrl/pinctrl-starfive.c

index 0b91215..5be9866 100644 (file)
@@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
        sfp->gc.base = -1;
        sfp->gc.ngpio = NR_GPIOS;
 
-       starfive_irq_chip.parent_device = dev;
        starfive_irq_chip.name = sfp->gc.label;
 
        sfp->gc.irq.chip = &starfive_irq_chip;
@@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
        if (ret)
                return dev_err_probe(dev, ret, "could not register gpiochip\n");
 
+       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
+
 out_pinctrl_enable:
        return pinctrl_enable(sfp->pctl);
 }