From patchwork Thu Jul 25 09:56:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 169689 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp11413925ilk; Thu, 25 Jul 2019 02:56:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTba2lL+LVolfZ25nSy3khj0xcwvTytsU0PNJ9FdeNn60yWB1PHfyBBPBMGV1kHoQtIC6Y X-Received: by 2002:a63:c748:: with SMTP id v8mr54237627pgg.418.1564048610452; Thu, 25 Jul 2019 02:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564048610; cv=none; d=google.com; s=arc-20160816; b=s3lgMI1wRnWUQ7bHscg8vtEI1NtLqHEC080Yd8fJJj4HHvoeMf09NrXBl+75BhMjab h0wpWFg7f841+jXIJMxHwtuG3TTaxge/0WENwC3Banyo1Uhj0KmEZXuUr/scRk9MMgb6 OMkF1kvvWVJk8y+Dn97+ShNppWmPe3q9iF8xgAiiyPJkmTiQODL/3EUKkGCIq82EUlee CAsBBGp7+RrZcFAxH73x3Igi0kZ3CZtqgg6XFZ6V0ynXF6SnMKE3f730UjgDXh3OEQEj qpiB+iR0kAdCGYdW0+J1SK5ceiyZDAxCEoevTXfzB+uj6EBKh4z5+vkXw0NnQqecTysE M0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=WbY06pGx4xfBMBjQ3bM8KhDBbMliaCTCe0/xa/K2Ezk=; b=l3vSHQleyH+YdvmmErfoCDz9x1FNR6Bw3yH4TYJTydXnarRDaiG7xgyTLVNrH8clHe Pt+jPtgDVvtuDjiLqD5B5hoDBaY9BfYGUloxF1bLWcVQ62GnC4HByF8lRghYKLWNxZAR y9KTK1iX4d7eGERBllX+Ag7KZEqvDV84AcL5yOyPEaLw18TJsszLEWq09j3K5l4fVldR JgxtOth6VmG1p9ZlIW85M6PnWJeNj9jB7MzWpcSitmM1eqo4I0aqpx/ylAmIPs+s5u6W gdMKr7VhxOt2Dxu846/kxA//1pD15H8xSVwLPXNQ1ddL81Xb9IcZav+L4pcW0Ql9Xjkp R6aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IH7fJaRb; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j62si16871012pgd.170.2019.07.25.02.56.50; Thu, 25 Jul 2019 02:56:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IH7fJaRb; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728834AbfGYJ4t (ORCPT + 5 others); Thu, 25 Jul 2019 05:56:49 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43733 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728186AbfGYJ4t (ORCPT ); Thu, 25 Jul 2019 05:56:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id f25so22765574pgv.10 for ; Thu, 25 Jul 2019 02:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=WbY06pGx4xfBMBjQ3bM8KhDBbMliaCTCe0/xa/K2Ezk=; b=IH7fJaRbcSgL+CYKVO82kjihUDaMMuveROBAAcl0U58wpsySgNR4ZbgQ8HzLV1opPe PlINuCAXy0AE3sUUejcUdgVSld2I1sUgazyK4JPuAYeiV9O8jaOWg1zUAU+rmMNZlChU jGZr9aqKxGNrUbO9YG6VA5q/nMJirmLnjKW9TE8D+Swko05OX4FWRG6O/mtN+UU52bCp eexyRSUN9G5GlDXaTn7MPP1wCJE+XHlptKtO7IFLC51rhbe/gVwcU4OoPymaDrooew9A XFr7qHyvbXFA09qtZKFb9PVOrhK5Ra2zEBG9vgNv59oU5BmHJuh2u9pDz5+SVtOWI//f S1ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WbY06pGx4xfBMBjQ3bM8KhDBbMliaCTCe0/xa/K2Ezk=; b=CCsKlcBrnj+vYXmvxvyJFTz4mpOBLFIFpQiJihW3JxIpJMdUPhLVwW0H8/jp+ICAxA AHbfzE6QmRRtqf81+H1fcHV1Jkx112Rg+5FxMqt87Bb2dWqkYlVvOFiitCBGhCxlmkmZ umgA2wkjrHC+pFYRmSM0QIxvedwOML377HJF8ettwz820uVodP9Wgf0wndN7MI7RBYzv 1V8rFS0bdWxrqiW1VEX/yphT+Sgv5qOBRsBIYaPHFlgRPMOvotx+T62K16aF040p5zTU q7CrNCKeY+5dm5iuqAKP1JP9MidojU8fNHcKwaWA0huhski4dV3u2WKMPb0wvw23qe8u U2uw== X-Gm-Message-State: APjAAAXNy2HCMviyX8DnOkEG1sM8n+OntOn4HJAS3DifxumezccZZWdD x8Ea9d0FqNxA2ieOleB8k7ibaA== X-Received: by 2002:a62:b408:: with SMTP id h8mr15431548pfn.46.1564048608476; Thu, 25 Jul 2019 02:56:48 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id l26sm44006103pgb.90.2019.07.25.02.56.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jul 2019 02:56:48 -0700 (PDT) From: Baolin Wang To: linus.walleij@linaro.org, orsonzhai@gmail.com, zhang.lyra@gmail.com Cc: baolin.wang@linaro.org, vincent.guittot@linaro.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] pinctrl: sprd: Change to use devm_platform_ioremap_resource() Date: Thu, 25 Jul 2019 17:56:30 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The devm_platform_ioremap_resource() function wraps platform_get_resource() and devm_ioremap_resource() in a single helper, thus use it to simplify the code. Signed-off-by: Baolin Wang --- drivers/pinctrl/sprd/pinctrl-sprd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c index c31b581..a32e809 100644 --- a/drivers/pinctrl/sprd/pinctrl-sprd.c +++ b/drivers/pinctrl/sprd/pinctrl-sprd.c @@ -1020,7 +1020,6 @@ int sprd_pinctrl_core_probe(struct platform_device *pdev, struct sprd_pinctrl *sprd_pctl; struct sprd_pinctrl_soc_info *pinctrl_info; struct pinctrl_pin_desc *pin_desc; - struct resource *res; int ret, i; sprd_pctl = devm_kzalloc(&pdev->dev, sizeof(struct sprd_pinctrl), @@ -1028,8 +1027,7 @@ int sprd_pinctrl_core_probe(struct platform_device *pdev, if (!sprd_pctl) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sprd_pctl->base = devm_ioremap_resource(&pdev->dev, res); + sprd_pctl->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sprd_pctl->base)) return PTR_ERR(sprd_pctl->base);