Skip to content

Commit e5f32bf

Browse files
committed
pinctrl: cherryview: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper
Since pm.h provides a helper for system no-IRQ PM callbacks, switch the driver to use it instead of open coded variant. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230717172821.62827-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent 2a6c0b4 commit e5f32bf

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/pinctrl/intel/pinctrl-cherryview.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,6 @@ static int chv_pinctrl_remove(struct platform_device *pdev)
17411741
return 0;
17421742
}
17431743

1744-
#ifdef CONFIG_PM_SLEEP
17451744
static int chv_pinctrl_suspend_noirq(struct device *dev)
17461745
{
17471746
struct intel_pinctrl *pctrl = dev_get_drvdata(dev);
@@ -1825,12 +1824,9 @@ static int chv_pinctrl_resume_noirq(struct device *dev)
18251824

18261825
return 0;
18271826
}
1828-
#endif
18291827

1830-
static const struct dev_pm_ops chv_pinctrl_pm_ops = {
1831-
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(chv_pinctrl_suspend_noirq,
1832-
chv_pinctrl_resume_noirq)
1833-
};
1828+
static DEFINE_NOIRQ_DEV_PM_OPS(chv_pinctrl_pm_ops,
1829+
chv_pinctrl_suspend_noirq, chv_pinctrl_resume_noirq);
18341830

18351831
static const struct acpi_device_id chv_pinctrl_acpi_match[] = {
18361832
{ "INT33FF", (kernel_ulong_t)chv_soc_data },
@@ -1843,7 +1839,7 @@ static struct platform_driver chv_pinctrl_driver = {
18431839
.remove = chv_pinctrl_remove,
18441840
.driver = {
18451841
.name = "cherryview-pinctrl",
1846-
.pm = &chv_pinctrl_pm_ops,
1842+
.pm = pm_sleep_ptr(&chv_pinctrl_pm_ops),
18471843
.acpi_match_table = chv_pinctrl_acpi_match,
18481844
},
18491845
};

0 commit comments

Comments
 (0)