From patchwork Fri Sep 27 03:50:54 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: 174575 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2954109ill; Thu, 26 Sep 2019 20:51:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqx570DBjmx6BBGOsTe/tXQu8+O5I4uY9q+uQxNDmQVGdxd7TNCrDiwgX27PS7t1dXS8gqFT X-Received: by 2002:a05:6402:1ade:: with SMTP id ba30mr2323844edb.304.1569556284233; Thu, 26 Sep 2019 20:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569556284; cv=none; d=google.com; s=arc-20160816; b=MK73AMLk2DxU69eSrhvueAfd+WuNJel2RL22fTo516ma/eRWdOyBBhWJyTEW5fbvu7 PmUBxIIvJba90IE9ERBrTAc9WIR4xFiISJPNCLn4evip4VD/TaGw5RRS9b0+Rj52vCHr WcGshONc5jC3c76nhQW+hLoTDKMgY7FPrxEw7OTs1sEiOKME6lUtjgw12zELrtxpQWwY tH/NGfYwT0l+ySuQZzL6mam+fiwn+gQmrpOEnCW0VHssf5/gVf6OXr1skcq6MF3cRJMD JpgrFStg8fwiVF0NUjfdMnhSTKTfR8j9cBuhCO+kKxq+0QlQCD09gs0atzOEbolLK62Y 2Dxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Ro1weBOfHyrfHvVXj42WLEM+jvzuYy/MP2n8jxoh6Sw=; b=qOwBZIQ96XWtR7eCh+SducgmuqbiS4eWyGX46TWdA5raA8NJuW/SGuTr/ZHB+nDQsC OpJeNAKrFNCTEDJi+zpgDR02qoPBAntR3dY8OCkR55ZqyhZhz4prqGpLaG69EElpSGet 5/xPp8ENFpqqdXvwkwiUZ2FK5vySU7nSKMQbN1Qha+K6S3GAln8utydFWc0Aw9HyBs0H a664Lk9kWhKVqzhTN7AgD1O2IF+nHb7j0v7YrkP5PlVZgBtJynw/eoaw1Bn3tn8/ghI7 e9WfcwP5AqGCLCrhm+jsQ+8L9H2QZp8i7kzUmyPWXQtzIyY8GOyHf0fbWjw+rzClNegz 2BNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iQjWf6PI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 w11si869890edi.442.2019.09.26.20.51.23; Thu, 26 Sep 2019 20:51:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=iQjWf6PI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1729140AbfI0DvV (ORCPT + 26 others); Thu, 26 Sep 2019 23:51:21 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39207 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727966AbfI0DvU (ORCPT ); Thu, 26 Sep 2019 23:51:20 -0400 Received: by mail-pl1-f193.google.com with SMTP id s17so509366plp.6 for ; Thu, 26 Sep 2019 20:51:19 -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:in-reply-to:references :in-reply-to:references; bh=Ro1weBOfHyrfHvVXj42WLEM+jvzuYy/MP2n8jxoh6Sw=; b=iQjWf6PIHd1v1UNoaVAblgCzkNb6Y31PZsclFAtKiEeyxoA/ZBhz42c1wwQb1Uo7sh Dezcpm8sod9AV4JS0qdMpF1LSML8dJx1P80ymBuFtN+p8Z8+FPFsgcKTcETG6EPKoLAm ED5gILcZrLBEy229SySmbmCw1wrkEtEplTuaYZDAi7TYvPkfu2WzOpzNwxs49jGj+9cD j7sLjfC/1lJ7D6z1uPsJ0HuhH5PpcZH3HI9Qk00mmb48QCyu3V3xxStoHzqK4yKnNxIm bGaISZM1api+Tb+gqZw4vOqZHjJ9rIW1ohO1CyODBWK1qF1EhtMtxhAgpQefOrSvlOhR txAA== 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:in-reply-to :references:in-reply-to:references; bh=Ro1weBOfHyrfHvVXj42WLEM+jvzuYy/MP2n8jxoh6Sw=; b=jE53nl75f9AAzN2Zl9XjQi257edWC3cOAm6ZFk4bRJ+sIEM4PDN1iZ10olDtbntOqP ezTIEMJmvG3V6Rs17a89T+rcLYIVtyQQAndjN6nuaBJem9dhaneb1pwxf77fE3o0xFnF XS69ftn+DwfPQ+W7YvwSYbfCWgLK4Vax82h1knkOPuB+43xJvdOETki30QPDOGCZtgH7 76D8sgG0CXJKlkgqwyK49Xvnu0kEwZuGe1ebheZ7+JnBjlSZBm9jkuH0SP/9KZcc19zW GnIUUg8dPE/syV2wrTNoLw4CFI/Xf1OMaqwLaMXCwZ3D2XzAXOV3ZC+boYJKcUu+hxM2 WETw== X-Gm-Message-State: APjAAAVvRriTJhMebSxt61yP1C7vT/JFQji7HyLwF7+n7suQSv2pJ9nb +GDESBoncpy6VvayEbABXQ3d8Q== X-Received: by 2002:a17:902:d887:: with SMTP id b7mr2142145plz.297.1569556279194; Thu, 26 Sep 2019 20:51:19 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id n66sm753640pfn.90.2019.09.26.20.51.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Sep 2019 20:51:18 -0700 (PDT) From: Baolin Wang To: mturquette@baylibre.com, sboyd@kernel.org Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] clk: sprd: Change to use devm_platform_ioremap_resource() Date: Fri, 27 Sep 2019 11:50:54 +0800 Message-Id: <64121209a05f6e34b70cf00d9303d13e765f8528.1569555841.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang --- drivers/clk/sprd/common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/clk/sprd/common.c b/drivers/clk/sprd/common.c index 7ad5ba2..c0af477 100644 --- a/drivers/clk/sprd/common.c +++ b/drivers/clk/sprd/common.c @@ -42,7 +42,6 @@ int sprd_clk_regmap_init(struct platform_device *pdev, void __iomem *base; struct device_node *node = pdev->dev.of_node; struct regmap *regmap; - struct resource *res; if (of_find_property(node, "sprd,syscon", NULL)) { regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon"); @@ -51,8 +50,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev, return PTR_ERR(regmap); } } else { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base);