mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
irqchip: st: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the deprecated SIMPLE_DEV_PM_OPS to DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr(). This allows dropping the __maybe_unused annotations from the PM callbacks, also reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled. Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Radu Rendec <radu@rendec.net> Link: https://patch.msgid.link/20260917013835.223139-1-triet.hoang.dev@gmail.com
This commit is contained in:
parent
af9c707eb0
commit
e571b39ded
|
|
@ -157,7 +157,7 @@ static int st_irq_syscfg_probe(struct platform_device *pdev)
|
|||
return st_irq_syscfg_enable(pdev);
|
||||
}
|
||||
|
||||
static int __maybe_unused st_irq_syscfg_resume(struct device *dev)
|
||||
static int st_irq_syscfg_resume(struct device *dev)
|
||||
{
|
||||
struct st_irq_syscfg *ddata = dev_get_drvdata(dev);
|
||||
|
||||
|
|
@ -165,12 +165,12 @@ static int __maybe_unused st_irq_syscfg_resume(struct device *dev)
|
|||
ST_A9_IRQ_MASK, ddata->config);
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(st_irq_syscfg_pm_ops, NULL, st_irq_syscfg_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(st_irq_syscfg_pm_ops, NULL, st_irq_syscfg_resume);
|
||||
|
||||
static struct platform_driver st_irq_syscfg_driver = {
|
||||
.driver = {
|
||||
.name = "st_irq_syscfg",
|
||||
.pm = &st_irq_syscfg_pm_ops,
|
||||
.pm = pm_sleep_ptr(&st_irq_syscfg_pm_ops),
|
||||
.of_match_table = st_irq_syscfg_match,
|
||||
},
|
||||
.probe = st_irq_syscfg_probe,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user