Skip to content

Commit bc1bd93

Browse files
hanxu-nxpmiquelraynal
authored andcommitted
mtd: nand: raw: gpmi: switch to SYSTEM_SLEEP_PM_OPS
Replace the SET_SYSTEM_SLEEP_PM_OPS with modern SYSTEM_SLEEP_PM_OPS alternatives. Signed-off-by: Han Xu <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 905050b commit bc1bd93

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,6 @@ static void gpmi_nand_remove(struct platform_device *pdev)
28112811
release_resources(this);
28122812
}
28132813

2814-
#ifdef CONFIG_PM_SLEEP
28152814
static int gpmi_pm_suspend(struct device *dev)
28162815
{
28172816
struct gpmi_nand_data *this = dev_get_drvdata(dev);
@@ -2849,7 +2848,6 @@ static int gpmi_pm_resume(struct device *dev)
28492848

28502849
return 0;
28512850
}
2852-
#endif /* CONFIG_PM_SLEEP */
28532851

28542852
static int __maybe_unused gpmi_runtime_suspend(struct device *dev)
28552853
{
@@ -2866,14 +2864,14 @@ static int __maybe_unused gpmi_runtime_resume(struct device *dev)
28662864
}
28672865

28682866
static const struct dev_pm_ops gpmi_pm_ops = {
2869-
SET_SYSTEM_SLEEP_PM_OPS(gpmi_pm_suspend, gpmi_pm_resume)
2870-
SET_RUNTIME_PM_OPS(gpmi_runtime_suspend, gpmi_runtime_resume, NULL)
2867+
SYSTEM_SLEEP_PM_OPS(gpmi_pm_suspend, gpmi_pm_resume)
2868+
RUNTIME_PM_OPS(gpmi_runtime_suspend, gpmi_runtime_resume, NULL)
28712869
};
28722870

28732871
static struct platform_driver gpmi_nand_driver = {
28742872
.driver = {
28752873
.name = "gpmi-nand",
2876-
.pm = &gpmi_pm_ops,
2874+
.pm = pm_ptr(&gpmi_pm_ops),
28772875
.of_match_table = gpmi_nand_id_table,
28782876
},
28792877
.probe = gpmi_nand_probe,

0 commit comments

Comments
 (0)