Skip to content

Commit 2aad477

Browse files
geertuKAGA-KOKO
authored andcommitted
irqchip/renesas-irqc: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas IRQC 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 callback, and reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/5a14f9932da20ec46cde27f314414474072755ed.1752086718.git.geert+renesas@glider.be
1 parent bc398dc commit 2aad477

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/irqchip/irq-renesas-irqc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void irqc_remove(struct platform_device *pdev)
227227
pm_runtime_disable(&pdev->dev);
228228
}
229229

230-
static int __maybe_unused irqc_suspend(struct device *dev)
230+
static int irqc_suspend(struct device *dev)
231231
{
232232
struct irqc_priv *p = dev_get_drvdata(dev);
233233

@@ -237,7 +237,7 @@ static int __maybe_unused irqc_suspend(struct device *dev)
237237
return 0;
238238
}
239239

240-
static SIMPLE_DEV_PM_OPS(irqc_pm_ops, irqc_suspend, NULL);
240+
static DEFINE_SIMPLE_DEV_PM_OPS(irqc_pm_ops, irqc_suspend, NULL);
241241

242242
static const struct of_device_id irqc_dt_ids[] = {
243243
{ .compatible = "renesas,irqc", },
@@ -251,7 +251,7 @@ static struct platform_driver irqc_device_driver = {
251251
.driver = {
252252
.name = "renesas_irqc",
253253
.of_match_table = irqc_dt_ids,
254-
.pm = &irqc_pm_ops,
254+
.pm = pm_sleep_ptr(&irqc_pm_ops),
255255
}
256256
};
257257

0 commit comments

Comments
 (0)