mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
ASoC: rt5514: 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-35-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3eedadf3d7
commit
fdf698fa3f
2 changed files with 7 additions and 7 deletions
|
|
@ -458,7 +458,7 @@ static int rt5514_spi_probe(struct spi_device *spi)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused rt5514_suspend(struct device *dev)
|
||||
static int rt5514_suspend(struct device *dev)
|
||||
{
|
||||
int irq = to_spi_device(dev)->irq;
|
||||
|
||||
|
|
@ -468,7 +468,7 @@ static int __maybe_unused rt5514_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused rt5514_resume(struct device *dev)
|
||||
static int rt5514_resume(struct device *dev)
|
||||
{
|
||||
struct rt5514_dsp *rt5514_dsp = dev_get_drvdata(dev);
|
||||
int irq = to_spi_device(dev)->irq;
|
||||
|
|
@ -490,7 +490,7 @@ static int __maybe_unused rt5514_resume(struct device *dev)
|
|||
}
|
||||
|
||||
static const struct dev_pm_ops rt5514_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume)
|
||||
};
|
||||
|
||||
static const struct of_device_id rt5514_of_match[] = {
|
||||
|
|
@ -502,7 +502,7 @@ MODULE_DEVICE_TABLE(of, rt5514_of_match);
|
|||
static struct spi_driver rt5514_spi_driver = {
|
||||
.driver = {
|
||||
.name = "rt5514",
|
||||
.pm = &rt5514_pm_ops,
|
||||
.pm = pm_ptr(&rt5514_pm_ops),
|
||||
.of_match_table = of_match_ptr(rt5514_of_match),
|
||||
},
|
||||
.probe = rt5514_spi_probe,
|
||||
|
|
|
|||
|
|
@ -1231,7 +1231,7 @@ static int rt5514_parse_dp(struct rt5514_priv *rt5514, struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static __maybe_unused int rt5514_i2c_resume(struct device *dev)
|
||||
static int rt5514_i2c_resume(struct device *dev)
|
||||
{
|
||||
struct rt5514_priv *rt5514 = dev_get_drvdata(dev);
|
||||
unsigned int val;
|
||||
|
|
@ -1313,7 +1313,7 @@ static int rt5514_i2c_probe(struct i2c_client *i2c)
|
|||
}
|
||||
|
||||
static const struct dev_pm_ops rt5514_i2_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(NULL, rt5514_i2c_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(NULL, rt5514_i2c_resume)
|
||||
};
|
||||
|
||||
static struct i2c_driver rt5514_i2c_driver = {
|
||||
|
|
@ -1321,7 +1321,7 @@ static struct i2c_driver rt5514_i2c_driver = {
|
|||
.name = "rt5514",
|
||||
.acpi_match_table = ACPI_PTR(rt5514_acpi_match),
|
||||
.of_match_table = of_match_ptr(rt5514_of_match),
|
||||
.pm = &rt5514_i2_pm_ops,
|
||||
.pm = pm_ptr(&rt5514_i2_pm_ops),
|
||||
},
|
||||
.probe = rt5514_i2c_probe,
|
||||
.id_table = rt5514_i2c_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue