Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3543606pxb; Tue, 7 Sep 2021 01:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymuxsSak0ADXk8EWjye2wVcTuYix8jQusxyyysM4W3HIVG3iGtoY6qB6UOQ4voCljJnDMk X-Received: by 2002:a17:906:c18c:: with SMTP id g12mr17818961ejz.458.1631004843486; Tue, 07 Sep 2021 01:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631004843; cv=none; d=google.com; s=arc-20160816; b=ONnzmcRc4Bn9uHK+5tGozxNzSDn+MOoYQqqiaOwC0wCbiGoAz08C49a5/J6R+j3zkE pmKwi7R1J6AV2qUw4a4ZkWDdd0/xfJH31vQrh1Z/6JirXsXAlyma6cA+Fhds3PSRXd5J OnkzNm49naXKuYMpYPgg/AZ6ZONGUSAq3Q43ZA8yXC7PmZ4wMGiCbwkBt2uKWIdbfuJ6 +0UmLsDQQlSl/cqO+n4iboBIhR/s0rkKKd9kxNThh+8vutHQdiAn9Edou315CfapSDKM mEzMKAcb1kenRourrtA3mPYfJ1l3LfNmKhZj9eQMTkTju0Ehp3NiXvjA67wXBzOfD6AF fEdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=EiZcwbJGWDJxc03nJDw3ZfDkp+YTBbZyBv6wwwR+nV4=; b=a1GFJ50SdAkZJ70/DxjgNrNbnzvIVwb5CBA5Sj5eyDy60cqa+rKIyywOrmGpPe/MAP hhuCeJUKlH4r0hHEG0h/eU4L7QGtCBs7l+rS3fPQ4Arp1q8kRLgifOZK9PGtv3nQBYMt X74RCa9xLo9FN5JqpWRCguvf9/dapvFUeSHCZGcD7i7o/TcZysECYMwv92qgOT9wAem6 UEW3p2FHIgDl/NQVoHfAHCVIssg/gMK3xiVABHaJKOfhwUpU007eC420sx16KOtKxnS/ gGrmwI+85LnAwuYNRGUPuTLu7SsH3IQGWZx+B8NAyqNu5oNQh1Dg8iA4X4vHRUgsKOf6 6M/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si10265326eji.566.2021.09.07.01.53.40; Tue, 07 Sep 2021 01:54:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244224AbhIGIxE (ORCPT + 99 others); Tue, 7 Sep 2021 04:53:04 -0400 Received: from mx21.baidu.com ([220.181.3.85]:35008 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243412AbhIGIw6 (ORCPT ); Tue, 7 Sep 2021 04:52:58 -0400 Received: from BJHW-Mail-Ex02.internal.baidu.com (unknown [10.127.64.12]) by Forcepoint Email with ESMTPS id 65091D7C9B4EF54D6851; Tue, 7 Sep 2021 16:51:50 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex02.internal.baidu.com (10.127.64.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 7 Sep 2021 16:51:50 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 7 Sep 2021 16:51:49 +0800 From: Cai Huoqing To: CC: Dinh Nguyen , Michael Turquette , Stephen Boyd , , Subject: [PATCH] clk: socfpga: s10: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:51:43 +0800 Message-ID: <20210907085144.4458-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex09.internal.baidu.com (172.31.51.49) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/clk/socfpga/clk-s10.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/socfpga/clk-s10.c b/drivers/clk/socfpga/clk-s10.c index b532d51faaee..4e508a844b3d 100644 --- a/drivers/clk/socfpga/clk-s10.c +++ b/drivers/clk/socfpga/clk-s10.c @@ -388,12 +388,10 @@ static int s10_clkmgr_init(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; struct stratix10_clock_data *clk_data; - struct resource *res; void __iomem *base; int i, num_clks; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { pr_err("%s: failed to map clock registers\n", __func__); return PTR_ERR(base); -- 2.25.1