From patchwork Tue Jun 18 04:15:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 17959 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 50B9925CAB for ; Tue, 18 Jun 2013 04:29:57 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id m1sf5104562ves.11 for ; Mon, 17 Jun 2013 21:29:56 -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=D9DNavHucO15gsKGRXbjQ4tICVxCUy7rQB/6b27M514=; b=Yds0bBToeTbnxLJPo1uNcA0foTojDuwdwCQ6mh6cw5ubsEjyfr9T76dmbSEm/Gc2CC IaEqklnA9KCPLjSWavW/8V4SjVXGVDP4FP67h2OhQSkQbHlHrCw1E6RAVXj7oNeiT1l+ jh9P8CyWiLJZyKq6yIJK544aYqwLPPg3OjNo//9VjHh0cYb+8TvQ1I3JliKaGLIdgJvD cNg+UXFE8DiQp8Qeyt0LpPi43tTcsX52OMq9mPQUl7AahjXiB0FCmE4xIQ2nEoTv67QZ 5fLEq1aP+DkS53GIilniMDYbYB7NQ0ayrU/2/qzuM5Ty0kVydyvKT5IfCPttRew4LbnO AcCA== X-Received: by 10.236.112.33 with SMTP id x21mr10670021yhg.57.1371529796550; Mon, 17 Jun 2013 21:29:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.61.166 with SMTP id q6ls1283085qer.70.gmail; Mon, 17 Jun 2013 21:29:56 -0700 (PDT) X-Received: by 10.220.105.197 with SMTP id u5mr62593vco.8.1371529796287; Mon, 17 Jun 2013 21:29:56 -0700 (PDT) Received: from mail-ve0-x230.google.com (mail-ve0-x230.google.com [2607:f8b0:400c:c01::230]) by mx.google.com with ESMTPS id v5si1841882vec.53.2013.06.17.21.29.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 21:29:56 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::230 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::230; Received: by mail-ve0-f176.google.com with SMTP id c13so2736183vea.7 for ; Mon, 17 Jun 2013 21:29:56 -0700 (PDT) X-Received: by 10.52.90.3 with SMTP id bs3mr746361vdb.64.1371529796190; Mon, 17 Jun 2013 21:29:56 -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.58.165.8 with SMTP id yu8csp58443veb; Mon, 17 Jun 2013 21:29:55 -0700 (PDT) X-Received: by 10.68.78.37 with SMTP id y5mr15408827pbw.28.1371529794896; Mon, 17 Jun 2013 21:29:54 -0700 (PDT) Received: from mail-pb0-x232.google.com (mail-pb0-x232.google.com [2607:f8b0:400e:c01::232]) by mx.google.com with ESMTPS id rs6si7584604pbc.182.2013.06.17.21.29.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 21:29:54 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::232 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=2607:f8b0:400e:c01::232; Received: by mail-pb0-f50.google.com with SMTP id wz7so3496695pbc.37 for ; Mon, 17 Jun 2013 21:29:54 -0700 (PDT) X-Received: by 10.66.231.7 with SMTP id tc7mr483707pac.143.1371529794348; Mon, 17 Jun 2013 21:29:54 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id pq5sm16460294pbc.7.2013.06.17.21.29.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 21:29:53 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: thierry.reding@gmail.com, sachin.kamat@linaro.org, patches@linaro.org, Mark Brown , Liam Girdwood Subject: [PATCH V2 11/15] regulator: ti-abb: Convert to use devm_ioremap_resource Date: Tue, 18 Jun 2013 09:45:07 +0530 Message-Id: <1371528907-14425-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370864113-17895-12-git-send-email-tushar.behera@linaro.org> References: <1370864113-17895-12-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQlQivRGPN520MH2KNKflTJOLAsBr1uXRaCGTD9RpQoj0ElB6SMH49CFx4Adu1SXCByeBrg3 X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::230 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(). While at it, remove the error message as devm_ioremap_resource prints a similar error message. Signed-off-by: Tushar Behera CC: Mark Brown CC: Liam Girdwood --- Changes for V2: * Removed error messages from devm_ioremap_resource exit path drivers/regulator/ti-abb-regulator.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c index 870d209..3753ed0 100644 --- a/drivers/regulator/ti-abb-regulator.c +++ b/drivers/regulator/ti-abb-regulator.c @@ -722,10 +722,9 @@ static int ti_abb_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - abb->base = devm_request_and_ioremap(dev, res); - if (!abb->base) { - dev_err(dev, "Unable to map '%s'\n", pname); - ret = -ENOMEM; + abb->base = devm_ioremap_resource(dev, res); + if (IS_ERR(abb->base)) { + ret = PTR_ERR(abb->base); goto err; } @@ -776,10 +775,9 @@ static int ti_abb_probe(struct platform_device *pdev) ret = -ENODEV; goto skip_opt; } - abb->ldo_base = devm_request_and_ioremap(dev, res); - if (!abb->ldo_base) { - dev_err(dev, "Unable to map '%s'\n", pname); - ret = -ENOMEM; + abb->ldo_base = devm_ioremap_resource(dev, res); + if (IS_ERR(abb->ldo_base)) { + ret = PTR_ERR(abb->ldo_base); goto err; }