summaryrefslogtreecommitdiff
path: root/sound/soc/img/img-i2s-in.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/img/img-i2s-in.c')
-rw-r--r--sound/soc/img/img-i2s-in.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c
index dacc29fcf24b..98d2ab68883a 100644
--- a/sound/soc/img/img-i2s-in.c
+++ b/sound/soc/img/img-i2s-in.c
@@ -395,7 +395,7 @@ static int img_i2s_in_dma_prepare_slave_config(struct snd_pcm_substream *st,
struct snd_pcm_hw_params *params, struct dma_slave_config *sc)
{
unsigned int i2s_channels = params_channels(params) / 2;
- struct snd_soc_pcm_runtime *rtd = st->private_data;
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(st);
struct snd_dmaengine_dai_dma_data *dma_data;
int ret;
@@ -539,7 +539,6 @@ static void img_i2s_in_dev_remove(struct platform_device *pdev)
img_i2s_in_runtime_suspend(&pdev->dev);
}
-#ifdef CONFIG_PM_SLEEP
static int img_i2s_in_suspend(struct device *dev)
{
struct img_i2s_in *i2s = dev_get_drvdata(dev);
@@ -586,7 +585,6 @@ static int img_i2s_in_resume(struct device *dev)
return 0;
}
-#endif
static const struct of_device_id img_i2s_in_of_match[] = {
{ .compatible = "img,i2s-in" },
@@ -595,19 +593,18 @@ static const struct of_device_id img_i2s_in_of_match[] = {
MODULE_DEVICE_TABLE(of, img_i2s_in_of_match);
static const struct dev_pm_ops img_i2s_in_pm_ops = {
- SET_RUNTIME_PM_OPS(img_i2s_in_runtime_suspend,
- img_i2s_in_runtime_resume, NULL)
- SET_SYSTEM_SLEEP_PM_OPS(img_i2s_in_suspend, img_i2s_in_resume)
+ RUNTIME_PM_OPS(img_i2s_in_runtime_suspend, img_i2s_in_runtime_resume, NULL)
+ SYSTEM_SLEEP_PM_OPS(img_i2s_in_suspend, img_i2s_in_resume)
};
static struct platform_driver img_i2s_in_driver = {
.driver = {
.name = "img-i2s-in",
.of_match_table = img_i2s_in_of_match,
- .pm = &img_i2s_in_pm_ops
+ .pm = pm_ptr(&img_i2s_in_pm_ops)
},
.probe = img_i2s_in_probe,
- .remove_new = img_i2s_in_dev_remove
+ .remove = img_i2s_in_dev_remove
};
module_platform_driver(img_i2s_in_driver);