diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-17 12:20:22 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-17 12:20:22 -0400 |
commit | 46dd30a8930fdd5cadd7f90376fa8df9c73ae90e (patch) | |
tree | c61de9ee7f2c828f47cf07348b7c8e3b9cbf4344 | |
parent | 18923d7ec799d53fe1a26ac67586dcd0ed59ac15 (diff) | |
parent | 010187fb45368470177b4d42916856f22a08a824 (diff) |
Merge remote-tracking branch 'asoc/topic/jz4740' into asoc-next
-rw-r--r-- | sound/soc/codecs/jz4740.c | 2 | ||||
-rw-r--r-- | sound/soc/jz4740/jz4740-i2s.c | 17 |
2 files changed, 8 insertions, 11 deletions
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index 5f607b35b68b..bcebd1a9ce31 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c | |||
@@ -384,8 +384,6 @@ static int jz4740_codec_remove(struct platform_device *pdev) | |||
384 | { | 384 | { |
385 | snd_soc_unregister_codec(&pdev->dev); | 385 | snd_soc_unregister_codec(&pdev->dev); |
386 | 386 | ||
387 | platform_set_drvdata(pdev, NULL); | ||
388 | |||
389 | return 0; | 387 | return 0; |
390 | } | 388 | } |
391 | 389 | ||
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c index 9a126441c5f3..4c849a49c72a 100644 --- a/sound/soc/jz4740/jz4740-i2s.c +++ b/sound/soc/jz4740/jz4740-i2s.c | |||
@@ -118,7 +118,7 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream, | |||
118 | ctrl |= JZ_AIC_CTRL_FLUSH; | 118 | ctrl |= JZ_AIC_CTRL_FLUSH; |
119 | jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); | 119 | jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); |
120 | 120 | ||
121 | clk_enable(i2s->clk_i2s); | 121 | clk_prepare_enable(i2s->clk_i2s); |
122 | 122 | ||
123 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); | 123 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); |
124 | conf |= JZ_AIC_CONF_ENABLE; | 124 | conf |= JZ_AIC_CONF_ENABLE; |
@@ -140,7 +140,7 @@ static void jz4740_i2s_shutdown(struct snd_pcm_substream *substream, | |||
140 | conf &= ~JZ_AIC_CONF_ENABLE; | 140 | conf &= ~JZ_AIC_CONF_ENABLE; |
141 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); | 141 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); |
142 | 142 | ||
143 | clk_disable(i2s->clk_i2s); | 143 | clk_disable_unprepare(i2s->clk_i2s); |
144 | } | 144 | } |
145 | 145 | ||
146 | static int jz4740_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | 146 | static int jz4740_i2s_trigger(struct snd_pcm_substream *substream, int cmd, |
@@ -314,10 +314,10 @@ static int jz4740_i2s_suspend(struct snd_soc_dai *dai) | |||
314 | conf &= ~JZ_AIC_CONF_ENABLE; | 314 | conf &= ~JZ_AIC_CONF_ENABLE; |
315 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); | 315 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); |
316 | 316 | ||
317 | clk_disable(i2s->clk_i2s); | 317 | clk_disable_unprepare(i2s->clk_i2s); |
318 | } | 318 | } |
319 | 319 | ||
320 | clk_disable(i2s->clk_aic); | 320 | clk_disable_unprepare(i2s->clk_aic); |
321 | 321 | ||
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
@@ -327,10 +327,10 @@ static int jz4740_i2s_resume(struct snd_soc_dai *dai) | |||
327 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 327 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
328 | uint32_t conf; | 328 | uint32_t conf; |
329 | 329 | ||
330 | clk_enable(i2s->clk_aic); | 330 | clk_prepare_enable(i2s->clk_aic); |
331 | 331 | ||
332 | if (dai->active) { | 332 | if (dai->active) { |
333 | clk_enable(i2s->clk_i2s); | 333 | clk_prepare_enable(i2s->clk_i2s); |
334 | 334 | ||
335 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); | 335 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); |
336 | conf |= JZ_AIC_CONF_ENABLE; | 336 | conf |= JZ_AIC_CONF_ENABLE; |
@@ -368,7 +368,7 @@ static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai) | |||
368 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 368 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
369 | uint32_t conf; | 369 | uint32_t conf; |
370 | 370 | ||
371 | clk_enable(i2s->clk_aic); | 371 | clk_prepare_enable(i2s->clk_aic); |
372 | 372 | ||
373 | jz4740_i2c_init_pcm_config(i2s); | 373 | jz4740_i2c_init_pcm_config(i2s); |
374 | 374 | ||
@@ -388,7 +388,7 @@ static int jz4740_i2s_dai_remove(struct snd_soc_dai *dai) | |||
388 | { | 388 | { |
389 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 389 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
390 | 390 | ||
391 | clk_disable(i2s->clk_aic); | 391 | clk_disable_unprepare(i2s->clk_aic); |
392 | return 0; | 392 | return 0; |
393 | } | 393 | } |
394 | 394 | ||
@@ -509,7 +509,6 @@ static int jz4740_i2s_dev_remove(struct platform_device *pdev) | |||
509 | iounmap(i2s->base); | 509 | iounmap(i2s->base); |
510 | release_mem_region(i2s->mem->start, resource_size(i2s->mem)); | 510 | release_mem_region(i2s->mem->start, resource_size(i2s->mem)); |
511 | 511 | ||
512 | platform_set_drvdata(pdev, NULL); | ||
513 | kfree(i2s); | 512 | kfree(i2s); |
514 | 513 | ||
515 | return 0; | 514 | return 0; |