From patchwork Tue Mar 26 09:14:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 15646 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4BE1323E66 for ; Tue, 26 Mar 2013 09:25:27 +0000 (UTC) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by fiordland.canonical.com (Postfix) with ESMTP id ED969A19889 for ; Tue, 26 Mar 2013 09:25:26 +0000 (UTC) Received: by mail-vb0-f51.google.com with SMTP id x19so955719vbf.38 for ; Tue, 26 Mar 2013 02:25:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=3uckuK7+3U33xUkPV1CC5V/wCENIa5vFIlLrhQW7uYI=; b=LZKxG8gagoTV6C5cKrR2i64QL3Ft9QSKnPLIGoeRvtUJvVqCYVWNaWcU/X9RqrMpLz akUNHWM+m1qRhQgIawq498IryDTQC4cRtqGvLApEBrO1QY1CIG3Wh4zaTekXfNf56QxX 4YkMMqRgj3CUNu0N/T0TDR8YTHRD4kXspu6BG8WbV13m/DHSrRG4ojsMdHhLAk3tOpCk qvYRHpuH4Aw8Wi1k+7XYdQt9ms5n40YZ9AfB1KVlsybgxq+7ZvyrvlnU91IOk25Vfq3v XUIVie23cdwI4uT+cN4IszdABYQwjf48pyIN1uH3Jh3RFNCO8f3Revmmyjo5HqFiTGTH 1AFA== X-Received: by 10.220.153.143 with SMTP id k15mr18928604vcw.33.1364289926468; Tue, 26 Mar 2013 02:25:26 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp62482ved; Tue, 26 Mar 2013 02:25:25 -0700 (PDT) X-Received: by 10.68.14.165 with SMTP id q5mr22047252pbc.125.1364289925242; Tue, 26 Mar 2013 02:25:25 -0700 (PDT) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id pc5si17264838pac.139.2013.03.26.02.25.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Mar 2013 02:25:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f54.google.com with SMTP id fa10so1508087pad.41 for ; Tue, 26 Mar 2013 02:25:24 -0700 (PDT) X-Received: by 10.68.75.109 with SMTP id b13mr22449929pbw.25.1364289924765; Tue, 26 Mar 2013 02:25:24 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id hs8sm16843365pbc.27.2013.03.26.02.25.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 26 Mar 2013 02:25:24 -0700 (PDT) From: Sachin Kamat To: linux-usb@vger.kernel.org Cc: balbi@ti.com, gregkh@linuxfoundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] usb: phy: samsung: Convert to devm_ioremap_resource() Date: Tue, 26 Mar 2013 14:44:03 +0530 Message-Id: <1364289243-18887-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlifqRnjkn9BoZyR35aZzAUsm5VHl0Zp/U/cVGV5jUSHVw0GMyFMdScc2/098fyqi12z+TI Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat --- drivers/usb/phy/phy-samsung-usb3.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c index 54f6418..133f3d0 100644 --- a/drivers/usb/phy/phy-samsung-usb3.c +++ b/drivers/usb/phy/phy-samsung-usb3.c @@ -244,11 +244,9 @@ static int samsung_usb3phy_probe(struct platform_device *pdev) return -ENODEV; } - phy_base = devm_request_and_ioremap(dev, phy_mem); - if (!phy_base) { - dev_err(dev, "%s: register mapping failed\n", __func__); - return -ENXIO; - } + phy_base = devm_ioremap_resource(dev, phy_mem); + if (IS_ERR(phy_base)) + return PTR_ERR(phy_base); sphy = devm_kzalloc(dev, sizeof(*sphy), GFP_KERNEL); if (!sphy)