Commit 6a564338 authored by Maarten Zanders's avatar Maarten Zanders Committed by Mark Brown

ASoC: fsl_asrc fsl_esai fsl_sai: allow CONFIG_PM=N

When CONFIG_PM=N, pm_runtime_put_sync() returns -ENOSYS
which breaks the probe function of these drivers.

Other users of pm_runtime_put_sync() typically don't check
the return value. In order to keep the program flow as
intended, check for -ENOSYS.

This commit is similar to commit 0434d3f4 (omap-mailbox.c).

Fixes: cab04ab5 ("ASoC: fsl_asrc: Don't use devm_regmap_init_mmio_clk")
Fixes: 203773e3 ("ASoC: fsl_esai: Don't use devm_regmap_init_mmio_clk")
Fixes: 2277e7e3 ("ASoC: fsl_sai: Don't use devm_regmap_init_mmio_clk")
Signed-off-by: default avatarMaarten Zanders <maarten.zanders@mind.be>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20221028141129.100702-1-maarten.zanders@mind.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6ec27c53
......@@ -1232,7 +1232,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
}
ret = pm_runtime_put_sync(&pdev->dev);
if (ret < 0)
if (ret < 0 && ret != -ENOSYS)
goto err_pm_get_sync;
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_asrc_component,
......
......@@ -1069,7 +1069,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
regmap_write(esai_priv->regmap, REG_ESAI_RSMB, 0);
ret = pm_runtime_put_sync(&pdev->dev);
if (ret < 0)
if (ret < 0 && ret != -ENOSYS)
goto err_pm_get_sync;
/*
......
......@@ -1446,7 +1446,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
}
ret = pm_runtime_put_sync(dev);
if (ret < 0)
if (ret < 0 && ret != -ENOSYS)
goto err_pm_get_sync;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment