Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3042592ybp; Sun, 6 Oct 2019 03:33:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZuuk1Tm0LztJTP0xi2kCNA0nzs8evLudw/QYutYOQ7QCA8MGqgGUQhVCeWM7N9o9E8VPh X-Received: by 2002:a05:6402:a50:: with SMTP id bt16mr23644603edb.114.1570357986743; Sun, 06 Oct 2019 03:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570357986; cv=none; d=google.com; s=arc-20160816; b=KR9+roJMAQACZhAQT8t+xsuOsMzj79uPB0I1lCVkeRElfNjK7vb4c56XgBl78QKeVY 5FmsDN6Qdut1SAKapT7qCE7b0nmZXtrJbA8xwSnSrsW2Cwkt4Plejasw2f2Z+Q5C3QD+ G1f5pc4S4AESDLItfXZN2gVlXwJ4OXTqfxK2z9Up4tZb+DMZl5GrlDaz6uHe6pfhGNQP OskeA5M64LTDvNlrASY7wQoasyyBY9miVAAEduT45JIqw5Qjz5cigyS316w0KTuja0PM SfU+J9T54oL3+l8V0rJC2awVQqWfMzPk3tmvPCc7lbUH8Ui7BnbVVjnTsBOg2CTLFrFK Yujg== 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=qWkpYOVAMlUyZgh+BByLwRHEUB5tAXtt4/qgGFCiRrM=; b=BrNz9v2vFfxeqZuDDlI08gbP5zrukTWX7geOP2JDL+v+DsGyEGG100x5B+7+cua5NS SqOSfcZaBhx4/jeX9XW44GqfW2nlWnumN/iWwueSoXTEuB2XVA4HvTQUmgeiq3hURceB ZhxBg+4jAz6yaPY7OFOV+5fKtSWC/XyqzcnBW9D29UT0ISMvTllnYfs49lAptJuSL/xn SJIQkm2bwo28vbkwc74LUpqylyx8T4IXpbXI0XdNpsQGvAnc2WZ5u5RRyjM7rYTfLGSq W1LpxG/HI5lTMe11ZkWAikhYZ56B7ij2qaAHQvVPa7RpnSINC8NGx5nZoz9+00P/ZvGQ ybtA== 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 v27si5439073ejb.182.2019.10.06.03.32.43; Sun, 06 Oct 2019 03:33:06 -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 S1726645AbfJFKcZ (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:56836 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726593AbfJFKcY (ORCPT ); Sun, 6 Oct 2019 06:32:24 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D22F96827D53ECFAFDE5; Sun, 6 Oct 2019 18:32:21 +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:15 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 05/34] rtc: cadence: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:24 +0800 Message-ID: <20191006102953.57536-6-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-cadence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-cadence.c b/drivers/rtc/rtc-cadence.c index 592aae2..595d5d2 100644 --- a/drivers/rtc/rtc-cadence.c +++ b/drivers/rtc/rtc-cadence.c @@ -255,7 +255,6 @@ static const struct rtc_class_ops cdns_rtc_ops = { static int cdns_rtc_probe(struct platform_device *pdev) { struct cdns_rtc *crtc; - struct resource *res; int ret; unsigned long ref_clk_freq; @@ -263,8 +262,7 @@ static int cdns_rtc_probe(struct platform_device *pdev) if (!crtc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - crtc->regs = devm_ioremap_resource(&pdev->dev, res); + crtc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(crtc->regs)) return PTR_ERR(crtc->regs); -- 2.7.4