Skip to content

Commit bc398dc

Browse files
geertuKAGA-KOKO
authored andcommitted
irqchip/renesas-intc-irqpin: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas INTC External IRQ Pin driver from SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This allows to drop the __maybe_unused annotations from its suspend callbacks, and reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/865e5274cc516d8c345048330a46e753e2bda677.1752086656.git.geert+renesas@glider.be
1 parent ea92b60 commit bc398dc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/irqchip/irq-renesas-intc-irqpin.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ static void intc_irqpin_remove(struct platform_device *pdev)
570570
pm_runtime_disable(&pdev->dev);
571571
}
572572

573-
static int __maybe_unused intc_irqpin_suspend(struct device *dev)
573+
static int intc_irqpin_suspend(struct device *dev)
574574
{
575575
struct intc_irqpin_priv *p = dev_get_drvdata(dev);
576576

@@ -580,15 +580,15 @@ static int __maybe_unused intc_irqpin_suspend(struct device *dev)
580580
return 0;
581581
}
582582

583-
static SIMPLE_DEV_PM_OPS(intc_irqpin_pm_ops, intc_irqpin_suspend, NULL);
583+
static DEFINE_SIMPLE_DEV_PM_OPS(intc_irqpin_pm_ops, intc_irqpin_suspend, NULL);
584584

585585
static struct platform_driver intc_irqpin_device_driver = {
586586
.probe = intc_irqpin_probe,
587587
.remove = intc_irqpin_remove,
588588
.driver = {
589589
.name = "renesas_intc_irqpin",
590590
.of_match_table = intc_irqpin_dt_ids,
591-
.pm = &intc_irqpin_pm_ops,
591+
.pm = pm_sleep_ptr(&intc_irqpin_pm_ops),
592592
}
593593
};
594594

0 commit comments

Comments
 (0)