Re: [PATCH 2/2] ASoC: tegra20-ac97: Convert to devm_ioremap_resource()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 26, 2013 at 12:20:08PM +0100, Mark Brown wrote:
> From: Mark Brown <broonie@xxxxxxxxxx>
> 
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
> ---
>  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@xxxxxxxxx>

Attachment: pgptf3MY0YDH2.pgp
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux