Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS()
together with pm_ptr(), which allows us dropping superfluous CONFIG_PM
ifdefs.
This optimizes slightly when CONFIG_PM is disabled, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250317095603.20073-26-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
.endianness = 1,
};
-#ifdef CONFIG_PM
static int max9860_suspend(struct device *dev)
{
struct max9860_priv *max9860 = dev_get_drvdata(dev);
return 0;
}
-#endif
static const struct dev_pm_ops max9860_pm_ops = {
- SET_RUNTIME_PM_OPS(max9860_suspend, max9860_resume, NULL)
+ RUNTIME_PM_OPS(max9860_suspend, max9860_resume, NULL)
};
static int max9860_probe(struct i2c_client *i2c)
.driver = {
.name = "max9860",
.of_match_table = max9860_of_match,
- .pm = &max9860_pm_ops,
+ .pm = pm_ptr(&max9860_pm_ops),
},
};