Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3042951ybp; Sun, 6 Oct 2019 03:33:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQmxq5RNoVrcgH1rS+72Z5XtIO4/SBuILkYipWikasJznPHxxNGAuyNbSYKGzev4BXm6oa X-Received: by 2002:a17:906:e92:: with SMTP id p18mr19307197ejf.308.1570358009955; Sun, 06 Oct 2019 03:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358009; cv=none; d=google.com; s=arc-20160816; b=zHCiC1xt5xo4pXOQ3TGNjYdW9nzw9SuG1ylDB0ukG/PRxpSN7UraLZePTpgYCfs2ny 24OPVuratbAXiSWg4I9ddteE+p/D3UFEhEptyNYk8M77unxO7hd9evO7q2YWs+plgVvY W8wWvsufHNZgd+HVlvuBpdU3+JwfGL8De/xA+bo5b8lF2iRFVH1olqp/iMJ8X6oRArYK 6JjTrgUNf5+cjBAoSdl19EJqlMF6ALqk9v5sm1jukiZSRsAZVZq/SzgpPMJqr+Oyx4gP vxGmh21C9yJxbVJl7uavFuB5CjQePHLcht6W1aRWSwmIaUayq9NJNNs/CAhdcLx+qbNW CJeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=IdlXAw7I8dQdHLLLHjx46gwzbbBLoA++xJEUx+5Khuk=; b=SDg4vT190cqkv2TfWBGlnuPuXmsLw5B/4L6Thd/+U7gNTOIa+VIsZkNZNRMZjxJoy8 Hqhge6hpSYvWi2n1Hp6pmzILL2zyqU69UBwG2zjUNKGeU7p4LWf5qi2eJJCbm1BbmnSC g+3kUJfOaCcjj11OkMHR++RBxjGGDHkUaM+xwNgJnMgm5FSFmlVAtyDP8RGlIOPm8m8U 9ti6XCkh9edxw0ESIU4V6lY9r7CgSrb8RBAiHUM2ndH3ecH5qlJKQ6ThC01E9+k4h6MR UlGXcMQmikV0TVnLiaLX8LnUjBOYIF98X0PRg+G/oWxsOpprntCEMmoDlAZ4x0XL3ngn 2lDw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si5493701eja.146.2019.10.06.03.33.06; Sun, 06 Oct 2019 03:33:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726720AbfJFKch (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:37 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57046 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726593AbfJFKce (ORCPT ); Sun, 6 Oct 2019 06:32:34 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 025DD93548BA88E5F915; Sun, 6 Oct 2019 18:32:32 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:32:22 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 07/34] rtc: davinci: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:26 +0800 Message-ID: <20191006102953.57536-8-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20191006102953.57536-1-yuehaibing@huawei.com> References: <20191006102953.57536-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/rtc/rtc-davinci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c index d8e0db2..390b735 100644 --- a/drivers/rtc/rtc-davinci.c +++ b/drivers/rtc/rtc-davinci.c @@ -469,7 +469,6 @@ static int __init davinci_rtc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct davinci_rtc *davinci_rtc; - struct resource *res; int ret = 0; davinci_rtc = devm_kzalloc(&pdev->dev, sizeof(struct davinci_rtc), GFP_KERNEL); @@ -480,8 +479,7 @@ static int __init davinci_rtc_probe(struct platform_device *pdev) if (davinci_rtc->irq < 0) return davinci_rtc->irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - davinci_rtc->base = devm_ioremap_resource(dev, res); + davinci_rtc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(davinci_rtc->base)) return PTR_ERR(davinci_rtc->base); -- 2.7.4