Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284018
b: refs/heads/master
c: c5cf4db
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 23, 2011
1 parent d4aa74b commit 2e44b3a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8270ba0c96702864cb0451079384e5060537d345
refs/heads/master: c5cf4dbc7f804bb4ff02a065b927bd8688204253
6 changes: 5 additions & 1 deletion trunk/sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>

#include <sound/soc.h>
#include <sound/pcm_params.h>
Expand Down Expand Up @@ -1095,6 +1096,8 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)

snd_soc_register_dai(&pri_dai->pdev->dev, &pri_dai->i2s_dai_drv);

pm_runtime_enable(&pdev->dev);

return 0;
err:
release_mem_region(regs_base, resource_size(res));
Expand All @@ -1105,6 +1108,7 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)
static __devexit int samsung_i2s_remove(struct platform_device *pdev)
{
struct i2s_dai *i2s, *other;
struct resource *res;

i2s = dev_get_drvdata(&pdev->dev);
other = i2s->pri_dai ? : i2s->sec_dai;
Expand All @@ -1113,7 +1117,7 @@ static __devexit int samsung_i2s_remove(struct platform_device *pdev)
other->pri_dai = NULL;
other->sec_dai = NULL;
} else {
struct resource *res;
pm_runtime_disable(&pdev->dev);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, resource_size(res));
Expand Down
5 changes: 5 additions & 0 deletions trunk/sound/soc/samsung/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>

#include <sound/soc.h>
#include <sound/pcm_params.h>
Expand Down Expand Up @@ -580,6 +581,8 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id];
pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id];

pm_runtime_enable(&pdev->dev);

ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
if (ret != 0) {
dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret);
Expand Down Expand Up @@ -609,6 +612,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev)

snd_soc_unregister_dai(&pdev->dev);

pm_runtime_disable(&pdev->dev);

iounmap(pcm->regs);

mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down

0 comments on commit 2e44b3a

Please sign in to comment.