From patchwork Mon Jun 10 11:35:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 17729 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D22DC25DF9 for ; Mon, 10 Jun 2013 11:50:44 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id hu16sf4218454qab.8 for ; Mon, 10 Jun 2013 04:50:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=L5aXR4KhkAaUOdtBymh2d6f5vErjkX/qdOVr09Y5ELM=; b=HJKSTPyzaQnA4McUsNoRNnIs3JA+yu3mi/OAD3j7wKFBjfRZWE5q1NknlF0hlr11M/ 4oxSLvcqs+eYcIvYOzFjQUXdbEAKkRMoXL8mh7SzVK3Up4A9NtyC8Zo9tYpgbYIru5ID w+LiyFdVbIt+EsT43sFoZhanuPyq4mfZRwNGWO6rnU1PRtY6UqSgrCKafe4dN7zp+xmc 5iT/KsThLfrcUE6j8zqbDv63wYNAfx1zSK4ATQROGBAdTGnDdHHfHgTUtNoP6JxuPNs0 urYPoBjG6xkhpF1Ceu0UdKG0yZrywZPt+3l+1P/DXHS39AcWeO3MG/K3NZqQi4KpLGZz qElg== X-Received: by 10.224.86.200 with SMTP id t8mr7017864qal.0.1370865044637; Mon, 10 Jun 2013 04:50:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.197 with SMTP id e5ls2695332qeo.42.gmail; Mon, 10 Jun 2013 04:50:44 -0700 (PDT) X-Received: by 10.58.65.101 with SMTP id w5mr5364712ves.16.1370865044427; Mon, 10 Jun 2013 04:50:44 -0700 (PDT) Received: from mail-ve0-x232.google.com (mail-ve0-x232.google.com [2607:f8b0:400c:c01::232]) by mx.google.com with ESMTPS id bs2si4685021veb.32.2013.06.10.04.50.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 04:50:44 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::232; Received: by mail-ve0-f178.google.com with SMTP id pb11so4696090veb.9 for ; Mon, 10 Jun 2013 04:50:44 -0700 (PDT) X-Received: by 10.52.170.148 with SMTP id am20mr4518166vdc.75.1370865044317; Mon, 10 Jun 2013 04:50:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp64986vcb; Mon, 10 Jun 2013 04:50:43 -0700 (PDT) X-Received: by 10.66.121.234 with SMTP id ln10mr13273824pab.129.1370865043680; Mon, 10 Jun 2013 04:50:43 -0700 (PDT) Received: from mail-pb0-x22a.google.com (mail-pb0-x22a.google.com [2607:f8b0:400e:c01::22a]) by mx.google.com with ESMTPS id tq5si6820445pab.117.2013.06.10.04.50.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 04:50:43 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::22a is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=2607:f8b0:400e:c01::22a; Received: by mail-pb0-f42.google.com with SMTP id un1so3024018pbc.1 for ; Mon, 10 Jun 2013 04:50:43 -0700 (PDT) X-Received: by 10.68.243.40 with SMTP id wv8mr9698575pbc.34.1370865043231; Mon, 10 Jun 2013 04:50:43 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id rn7sm10242037pbc.12.2013.06.10.04.50.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 04:50:41 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: thierry.reding@gmail.com, patches@linaro.org, alsa-devel@alsa-project.org, Liam Girdwood , Mark Brown Subject: [PATCH 12/15] ASoC: spear: Convert to use devm_ioremap_resource Date: Mon, 10 Jun 2013 17:05:10 +0530 Message-Id: <1370864113-17895-13-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370864113-17895-1-git-send-email-tushar.behera@linaro.org> References: <1370864113-17895-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQmbE1cmph/oagwWur8J8aDReoEFznHTERCyzvZlpruINvpA2di4NZacrpKQBe9yR5D4ye9P X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()") introduced devm_ioremap_resource() and deprecated the use of devm_request_and_ioremap(). Signed-off-by: Tushar Behera CC: alsa-devel@alsa-project.org CC: Liam Girdwood CC: Mark Brown --- sound/soc/spear/spdif_out.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c index 4bde512..896ee7f 100644 --- a/sound/soc/spear/spdif_out.c +++ b/sound/soc/spear/spdif_out.c @@ -282,27 +282,17 @@ static int spdif_out_probe(struct platform_device *pdev) struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; - - if (!devm_request_mem_region(&pdev->dev, res->start, - resource_size(res), pdev->name)) { - dev_warn(&pdev->dev, "Failed to get memory resourse\n"); - return -ENOENT; - } - host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); if (!host) { dev_warn(&pdev->dev, "kzalloc fail\n"); return -ENOMEM; } - host->io_base = devm_request_and_ioremap(&pdev->dev, res->start, - resource_size(res)); - if (!host->io_base) { - dev_warn(&pdev->dev, "ioremap failed\n"); - return -ENOMEM; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + host->io_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(host->io_base)) { + dev_warn(&pdev->dev, "devm_ioremap_resource failed\n"); + return PTR_ERR(host->io_base); } host->clk = devm_clk_get(&pdev->dev, NULL);