mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
ASoC: rt5645: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-36-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
fdf698fa3f
commit
71ba303a04
|
|
@ -4314,7 +4314,7 @@ static void rt5645_i2c_shutdown(struct i2c_client *i2c)
|
|||
gpiod_set_value(rt5645->gpiod_cbj_sleeve, 0);
|
||||
}
|
||||
|
||||
static int __maybe_unused rt5645_sys_suspend(struct device *dev)
|
||||
static int rt5645_sys_suspend(struct device *dev)
|
||||
{
|
||||
struct rt5645_priv *rt5645 = dev_get_drvdata(dev);
|
||||
|
||||
|
|
@ -4327,7 +4327,7 @@ static int __maybe_unused rt5645_sys_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused rt5645_sys_resume(struct device *dev)
|
||||
static int rt5645_sys_resume(struct device *dev)
|
||||
{
|
||||
struct rt5645_priv *rt5645 = dev_get_drvdata(dev);
|
||||
|
||||
|
|
@ -4342,7 +4342,7 @@ static int __maybe_unused rt5645_sys_resume(struct device *dev)
|
|||
}
|
||||
|
||||
static const struct dev_pm_ops rt5645_pm = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(rt5645_sys_suspend, rt5645_sys_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(rt5645_sys_suspend, rt5645_sys_resume)
|
||||
};
|
||||
|
||||
static struct i2c_driver rt5645_i2c_driver = {
|
||||
|
|
@ -4350,7 +4350,7 @@ static struct i2c_driver rt5645_i2c_driver = {
|
|||
.name = "rt5645",
|
||||
.of_match_table = of_match_ptr(rt5645_of_match),
|
||||
.acpi_match_table = ACPI_PTR(rt5645_acpi_match),
|
||||
.pm = &rt5645_pm,
|
||||
.pm = pm_ptr(&rt5645_pm),
|
||||
},
|
||||
.probe = rt5645_i2c_probe,
|
||||
.remove = rt5645_i2c_remove,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user