Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5325649ybp; Tue, 8 Oct 2019 00:45:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzFjrG2ZThrCw9dudTaAs3vSgTDbUPwgk8vqZWrqm5QWCHWRa5zd+UpoljhaFZMgfDrZac X-Received: by 2002:a17:906:11c3:: with SMTP id o3mr26880688eja.297.1570520710820; Tue, 08 Oct 2019 00:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570520710; cv=none; d=google.com; s=arc-20160816; b=ZOQQ3vQby68QfbvkguEeZon4g3xphYoBqc7Jz0bSTdPxPM7fZltq+BCboVP9+b2hUU lemGfPXxXsTzNTFHT1w9CodbTFzhdVM+OEYSV5zav9LiwnjZRQjGMjbnNrtOTY5qKl6M 5KXX1PQk6FjfVxcLgrMn1rKVQFvga8YiGwFUa6/Us+Fl+tnbn3MsoAEpa53Fu5CmigIg TiPKGQ4R/fb3zAG1isT/72s2Q7v2SLhWLVLM3px0OxNNHOe/usJGpOt/wnKT9DEkdRr5 79S5KSpOgcmBvJ8XMMzg2kKYj6X7QQ9pYjJbYMMCDnzNm2N0uGCMz36682A6S0sauIVT DhCQ== 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=2fURBUxy7kUtYmeZp2XZ00W6cQyOn6QtabdpUGQ4D60=; b=xeXga0y1euLJc2L4MWmXO0FPSV0hTKKefVDNMtUUsUo11Tpq4UaoI6Xod8IkEEvwUy 5KKI/+XNT0oBRNFmv+Ox0ndScpywF2gkOyRxPXVq5sWK3TpLbeRkUiMmlZ3UxgCn28mH aapafYI3b0/ntLjd+JKc97S2CEWG30aMWFMmE7yVWZrlUmJi3mjbNYdQoaiG8Rg+kpJX U1JRhtLYHGcHq76sLQSDRPeI8Oe3d80R9Cc2jPHt4ymugcaRnIoC5TmXifEmmXK0PqNU ikSmGtz6uAqUbbRTYTGzOYT8CgUDxN+B/mP3Sxe7pFZ18D0lU6pIcjkd182cPttJ8SIK hq3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eN9IOY1D; 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 pv13si8119609ejb.79.2019.10.08.00.44.47; Tue, 08 Oct 2019 00:45:10 -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=eN9IOY1D; 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 S1730371AbfJHHmB (ORCPT + 99 others); Tue, 8 Oct 2019 03:42:01 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45004 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729740AbfJHHl7 (ORCPT ); Tue, 8 Oct 2019 03:41:59 -0400 Received: by mail-pl1-f194.google.com with SMTP id q15so8082543pll.11 for ; Tue, 08 Oct 2019 00:41:59 -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=2fURBUxy7kUtYmeZp2XZ00W6cQyOn6QtabdpUGQ4D60=; b=eN9IOY1D4JQEhqeD44A6DLSptkIVd9EhQ/T4ofBMp9tMybypG0GD+jceTeEDFwcwV7 pX90ySjQ5ypCgooLkJtxt3hhiI9btIxC2oZWRlJTA/XGY2xE465JEYP/jh6TVRHRbRei +iZFx52+vEmaikMY6Xd65ZTnvtPZZhVEITp09SG76jmRAi9ykhVh54pgk6wweIWH0A6k qZtrJhqn4zf9OSEs3ILwYWXfAdJ/tmC/KKvMP3qhdl5TIfCg2mwvzpbgxFFAB/Rklut/ WC1HZnyvgj4kDwjviC8/NfJEL78LAc/JWbztrIUBvdsL14/6NBJ8/H6YV5r8icot/B+E 9t9Q== 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=2fURBUxy7kUtYmeZp2XZ00W6cQyOn6QtabdpUGQ4D60=; b=cfgoW6/gfZmg9pz1uNy3XBkf3q//F8ivIZm9pEefmQWctYCQCjU/REqGueH361oAAO bhgjkpz6U8/7+/ETbeJzpZCbXXgf4+R6lpiAcP3nqGSw5j2q6u4xp+FFP2kehYkWiBR8 ZfvHVyF2oz/z8OBn/VdVxudwr/Y0loRfoaWIt3z5yLHMCHE7yRC8Kpwx1Oxxuz5yrCvS y7/EKDlbj8LIyS/N3yWfiUn1gIwzbm401MFB/EPUpFyPrNNx0dDw/4XQeypOMwr553eh lRwKgJkvr2K6BnX7/Ah+u+7/Lp7A373qCPi4YjYS2jTXLsUwS5CaYkZKA9tbKCYZegBb AOjA== X-Gm-Message-State: APjAAAWQjUVkWgFJZ16TBSy30QaNT7yIU/JflrCSpDv8i1I29txgCFDK U/J8F/z9moo099lCKcGoJJc2yA== X-Received: by 2002:a17:902:8c8d:: with SMTP id t13mr2644087plo.3.1570520519051; Tue, 08 Oct 2019 00:41:59 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id y8sm18231363pge.21.2019.10.08.00.41.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Oct 2019 00:41:58 -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 v2 2/2] clk: sprd: Change to use devm_platform_ioremap_resource() Date: Tue, 8 Oct 2019 15:41:39 +0800 Message-Id: <841d26a2adb4bf3b4423f82a41dd3f1346413db6.1570520268.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.org> References: <1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.org> In-Reply-To: <1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.org> References: <1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.org> 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 --- Changes from v1: - None. --- drivers/clk/sprd/common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); -- 1.7.9.5