Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: ts3a227e: 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 superfluous CONFIG_PM_SLEEP 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-47-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Takashi Iwai and committed by
Mark Brown
2db8e2c7 1570c33f

+2 -4
+2 -4
sound/soc/codecs/ts3a227e.c
··· 399 399 return 0; 400 400 } 401 401 402 - #ifdef CONFIG_PM_SLEEP 403 402 static int ts3a227e_suspend(struct device *dev) 404 403 { 405 404 struct ts3a227e *ts3a227e = dev_get_drvdata(dev); ··· 418 419 419 420 return 0; 420 421 } 421 - #endif 422 422 423 423 static const struct dev_pm_ops ts3a227e_pm = { 424 - SET_SYSTEM_SLEEP_PM_OPS(ts3a227e_suspend, ts3a227e_resume) 424 + SYSTEM_SLEEP_PM_OPS(ts3a227e_suspend, ts3a227e_resume) 425 425 }; 426 426 427 427 static const struct i2c_device_id ts3a227e_i2c_ids[] = { ··· 448 450 static struct i2c_driver ts3a227e_driver = { 449 451 .driver = { 450 452 .name = "ts3a227e", 451 - .pm = &ts3a227e_pm, 453 + .pm = pm_ptr(&ts3a227e_pm), 452 454 .of_match_table = of_match_ptr(ts3a227e_of_match), 453 455 .acpi_match_table = ACPI_PTR(ts3a227e_acpi_match), 454 456 },