aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz2013-06-21 03:44:19 -0500
committerMisael Lopez Cruz2013-07-22 14:43:04 -0500
commitc01aab89dc75e139d8762b058f419490c6a3dad4 (patch)
tree17cd854ef2dd2e5fde82a182580046befac86f81
parent9264614eec7c5c7dc3486a7367330fef82a037cc (diff)
downloadkernel-audio-c01aab89dc75e139d8762b058f419490c6a3dad4.tar.gz
kernel-audio-c01aab89dc75e139d8762b058f419490c6a3dad4.tar.xz
kernel-audio-c01aab89dc75e139d8762b058f419490c6a3dad4.zip
ASoC: davinci-mcasp: Remove unnecesary runtime PM calls
Runtime PM calls in trigger() are not symmetric, this causes that usage counter always keeps increasing. Similarly, runtime PM calls in driver probe() and remove() are not needed since ASoC already takes care of calling the appropriate runtime PM calls as required during stream lifecycle. Change-Id: I29ef47d9dce3b21db47b54c50d1c64b2fe82d804 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
-rw-r--r--sound/soc/davinci/davinci-mcasp.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 02ab0e9fca76..b215c0b2ae50 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -937,19 +937,10 @@ static int davinci_mcasp_trigger(struct snd_pcm_substream *substream,
937 case SNDRV_PCM_TRIGGER_RESUME: 937 case SNDRV_PCM_TRIGGER_RESUME:
938 case SNDRV_PCM_TRIGGER_START: 938 case SNDRV_PCM_TRIGGER_START:
939 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 939 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
940 ret = pm_runtime_get_sync(dev->dev);
941 if (IS_ERR_VALUE(ret))
942 dev_err(dev->dev, "pm_runtime_get_sync() failed\n");
943 davinci_mcasp_start(dev, substream->stream); 940 davinci_mcasp_start(dev, substream->stream);
944 break; 941 break;
945 942
946 case SNDRV_PCM_TRIGGER_SUSPEND: 943 case SNDRV_PCM_TRIGGER_SUSPEND:
947 davinci_mcasp_stop(dev, substream->stream);
948 ret = pm_runtime_put_sync(dev->dev);
949 if (IS_ERR_VALUE(ret))
950 dev_err(dev->dev, "pm_runtime_put_sync() failed\n");
951 break;
952
953 case SNDRV_PCM_TRIGGER_STOP: 944 case SNDRV_PCM_TRIGGER_STOP:
954 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 945 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
955 davinci_mcasp_stop(dev, substream->stream); 946 davinci_mcasp_stop(dev, substream->stream);
@@ -1211,12 +1202,6 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1211 1202
1212 pm_runtime_enable(&pdev->dev); 1203 pm_runtime_enable(&pdev->dev);
1213 1204
1214 ret = pm_runtime_get_sync(&pdev->dev);
1215 if (IS_ERR_VALUE(ret)) {
1216 dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n");
1217 return ret;
1218 }
1219
1220 dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); 1205 dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem));
1221 if (!dev->base) { 1206 if (!dev->base) {
1222 dev_err(&pdev->dev, "ioremap failed\n"); 1207 dev_err(&pdev->dev, "ioremap failed\n");
@@ -1284,7 +1269,6 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1284err_unregister_dai: 1269err_unregister_dai:
1285 snd_soc_unregister_dai(&pdev->dev); 1270 snd_soc_unregister_dai(&pdev->dev);
1286err_release_clk: 1271err_release_clk:
1287 pm_runtime_put_sync(&pdev->dev);
1288 pm_runtime_disable(&pdev->dev); 1272 pm_runtime_disable(&pdev->dev);
1289 return ret; 1273 return ret;
1290} 1274}
@@ -1295,7 +1279,6 @@ static int davinci_mcasp_remove(struct platform_device *pdev)
1295 snd_soc_unregister_dai(&pdev->dev); 1279 snd_soc_unregister_dai(&pdev->dev);
1296 davinci_soc_platform_unregister(&pdev->dev); 1280 davinci_soc_platform_unregister(&pdev->dev);
1297 1281
1298 pm_runtime_put_sync(&pdev->dev);
1299 pm_runtime_disable(&pdev->dev); 1282 pm_runtime_disable(&pdev->dev);
1300 1283
1301 return 0; 1284 return 0;