mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
ASoC: qcom: 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 to drop ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-74-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -160,14 +160,14 @@ static int sc7180_lpass_exit(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused sc7180_lpass_dev_resume(struct device *dev)
|
||||
static int sc7180_lpass_dev_resume(struct device *dev)
|
||||
{
|
||||
struct lpass_data *drvdata = dev_get_drvdata(dev);
|
||||
|
||||
return clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks);
|
||||
}
|
||||
|
||||
static int __maybe_unused sc7180_lpass_dev_suspend(struct device *dev)
|
||||
static int sc7180_lpass_dev_suspend(struct device *dev)
|
||||
{
|
||||
struct lpass_data *drvdata = dev_get_drvdata(dev);
|
||||
|
||||
@@ -176,7 +176,7 @@ static int __maybe_unused sc7180_lpass_dev_suspend(struct device *dev)
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops sc7180_lpass_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume)
|
||||
};
|
||||
|
||||
static const struct lpass_variant sc7180_data = {
|
||||
@@ -312,7 +312,7 @@ static struct platform_driver sc7180_lpass_cpu_platform_driver = {
|
||||
.driver = {
|
||||
.name = "sc7180-lpass-cpu",
|
||||
.of_match_table = of_match_ptr(sc7180_lpass_cpu_device_id),
|
||||
.pm = &sc7180_lpass_pm_ops,
|
||||
.pm = pm_ptr(&sc7180_lpass_pm_ops),
|
||||
},
|
||||
.probe = asoc_qcom_lpass_cpu_platform_probe,
|
||||
.remove = asoc_qcom_lpass_cpu_platform_remove,
|
||||
|
||||
@@ -233,14 +233,14 @@ static int sc7280_lpass_exit(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused sc7280_lpass_dev_resume(struct device *dev)
|
||||
static int sc7280_lpass_dev_resume(struct device *dev)
|
||||
{
|
||||
struct lpass_data *drvdata = dev_get_drvdata(dev);
|
||||
|
||||
return clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks);
|
||||
}
|
||||
|
||||
static int __maybe_unused sc7280_lpass_dev_suspend(struct device *dev)
|
||||
static int sc7280_lpass_dev_suspend(struct device *dev)
|
||||
{
|
||||
struct lpass_data *drvdata = dev_get_drvdata(dev);
|
||||
|
||||
@@ -249,7 +249,7 @@ static int __maybe_unused sc7280_lpass_dev_suspend(struct device *dev)
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops sc7280_lpass_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume)
|
||||
};
|
||||
|
||||
static const struct lpass_variant sc7280_data = {
|
||||
@@ -442,7 +442,7 @@ static struct platform_driver sc7280_lpass_cpu_platform_driver = {
|
||||
.driver = {
|
||||
.name = "sc7280-lpass-cpu",
|
||||
.of_match_table = of_match_ptr(sc7280_lpass_cpu_device_id),
|
||||
.pm = &sc7280_lpass_pm_ops,
|
||||
.pm = pm_ptr(&sc7280_lpass_pm_ops),
|
||||
},
|
||||
.probe = asoc_qcom_lpass_cpu_platform_probe,
|
||||
.remove = asoc_qcom_lpass_cpu_platform_remove,
|
||||
|
||||
Reference in New Issue
Block a user