public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: tegra20-ac97: Convert to devm_clk_get()
@ 2013-06-26 11:20 Mark Brown
       [not found] ` <1372245608-15596-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-06-26 11:20 UTC (permalink / raw)
  To: Stephen Warren, Liam Girdwood; +Cc: linux-tegra, alsa-devel, Mark Brown

From: Mark Brown <broonie@linaro.org>

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 sound/soc/tegra/tegra20_ac97.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index 2f70ea7..d8c142d 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -327,7 +327,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 	}
 	dev_set_drvdata(&pdev->dev, ac97);
 
-	ac97->clk_ac97 = clk_get(&pdev->dev, NULL);
+	ac97->clk_ac97 = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(ac97->clk_ac97)) {
 		dev_err(&pdev->dev, "Can't retrieve ac97 clock\n");
 		ret = PTR_ERR(ac97->clk_ac97);
@@ -443,7 +443,6 @@ err_unregister_pcm:
 err_unregister_component:
 	snd_soc_unregister_component(&pdev->dev);
 err_clk_put:
-	clk_put(ac97->clk_ac97);
 err:
 	return ret;
 }
@@ -458,7 +457,6 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev)
 	tegra_asoc_utils_fini(&ac97->util_data);
 
 	clk_disable_unprepare(ac97->clk_ac97);
-	clk_put(ac97->clk_ac97);
 
 	return 0;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ASoC: tegra20-ac97: Convert to devm_ioremap_resource()
       [not found] ` <1372245608-15596-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2013-06-26 11:20   ` Mark Brown
       [not found]     ` <1372245608-15596-2-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2013-06-26 17:28   ` [PATCH 1/2] ASoC: tegra20-ac97: Convert to devm_clk_get() Stephen Warren
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-06-26 11:20 UTC (permalink / raw)
  To: Stephen Warren, Liam Girdwood
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Mark Brown

From: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Signed-off-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 sound/soc/tegra/tegra20_ac97.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index d8c142d..9043626d 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -341,18 +341,10 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 		goto err_clk_put;
 	}
 
-	memregion = devm_request_mem_region(&pdev->dev, mem->start,
-					    resource_size(mem), DRV_NAME);
-	if (!memregion) {
-		dev_err(&pdev->dev, "Memory region already claimed\n");
-		ret = -EBUSY;
-		goto err_clk_put;
-	}
-
-	regs = devm_ioremap(&pdev->dev, mem->start, resource_size(mem));
-	if (!regs) {
-		dev_err(&pdev->dev, "ioremap failed\n");
-		ret = -ENOMEM;
+	regs = devm_ioremap_resource(&pdev->dev, mem);
+	if (IS_ERR(regs)) {
+		ret = PTR_ERR(regs);
+		dev_err(&pdev->dev, "ioremap failed: %d\n", ret);
 		goto err_clk_put;
 	}
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ASoC: tegra20-ac97: Convert to devm_clk_get()
       [not found] ` <1372245608-15596-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2013-06-26 11:20   ` [PATCH 2/2] ASoC: tegra20-ac97: Convert to devm_ioremap_resource() Mark Brown
@ 2013-06-26 17:28   ` Stephen Warren
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2013-06-26 17:28 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Mark Brown

On 06/26/2013 05:20 AM, Mark Brown wrote:
> From: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

The series,
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

And this series answers my question on the other patch; I'd overlooked
this series when scanning through threads.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] ASoC: tegra20-ac97: Convert to devm_ioremap_resource()
       [not found]     ` <1372245608-15596-2-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2013-06-27 10:22       ` Thierry Reding
  2013-06-27 11:11         ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2013-06-27 10:22 UTC (permalink / raw)
  To: Mark Brown
  Cc: Stephen Warren, Liam Girdwood, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

On Wed, Jun 26, 2013 at 12:20:08PM +0100, Mark Brown wrote:
> From: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> 
> Signed-off-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  sound/soc/tegra/tegra20_ac97.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
> index d8c142d..9043626d 100644
> --- a/sound/soc/tegra/tegra20_ac97.c
> +++ b/sound/soc/tegra/tegra20_ac97.c
> @@ -341,18 +341,10 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
>  		goto err_clk_put;
>  	}
>  
> -	memregion = devm_request_mem_region(&pdev->dev, mem->start,
> -					    resource_size(mem), DRV_NAME);
> -	if (!memregion) {
> -		dev_err(&pdev->dev, "Memory region already claimed\n");
> -		ret = -EBUSY;
> -		goto err_clk_put;
> -	}
> -
> -	regs = devm_ioremap(&pdev->dev, mem->start, resource_size(mem));
> -	if (!regs) {
> -		dev_err(&pdev->dev, "ioremap failed\n");
> -		ret = -ENOMEM;
> +	regs = devm_ioremap_resource(&pdev->dev, mem);
> +	if (IS_ERR(regs)) {
> +		ret = PTR_ERR(regs);
> +		dev_err(&pdev->dev, "ioremap failed: %d\n", ret);

Can you please remove this error message as well, please? A message to
the same effect is already output by devm_ioremap_resource(). Other than
that, looks good:

Reviewed-by: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] ASoC: tegra20-ac97: Convert to devm_ioremap_resource()
  2013-06-27 10:22       ` Thierry Reding
@ 2013-06-27 11:11         ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-06-27 11:11 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-tegra, alsa-devel, Liam Girdwood, Stephen Warren


[-- Attachment #1.1: Type: text/plain, Size: 278 bytes --]

On Thu, Jun 27, 2013 at 12:22:12PM +0200, Thierry Reding wrote:

> Can you please remove this error message as well, please? A message to
> the same effect is already output by devm_ioremap_resource(). Other than
> that, looks good:

Too late, send an incremental patch please.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-27 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26 11:20 [PATCH 1/2] ASoC: tegra20-ac97: Convert to devm_clk_get() Mark Brown
     [not found] ` <1372245608-15596-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-06-26 11:20   ` [PATCH 2/2] ASoC: tegra20-ac97: Convert to devm_ioremap_resource() Mark Brown
     [not found]     ` <1372245608-15596-2-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-06-27 10:22       ` Thierry Reding
2013-06-27 11:11         ` Mark Brown
2013-06-26 17:28   ` [PATCH 1/2] ASoC: tegra20-ac97: Convert to devm_clk_get() Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox