Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3046083ybp; Sun, 6 Oct 2019 03:37:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3vmopcQTkRttT4lt6IkEDyZR5rFKhX99QMcEYR+2ib1jKAo80DNgxeninFycVh4aGyVkM X-Received: by 2002:a17:906:6084:: with SMTP id t4mr19265160ejj.164.1570358268317; Sun, 06 Oct 2019 03:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358268; cv=none; d=google.com; s=arc-20160816; b=KPz3Drt+rFK/t/825k4w+xTPfbB45KOJ1ehbH6NL2Ew+kewwuglkEt9/Lzpn3GSAJD ERCCgLqwpNyBy0BjRbc8w2XH3T3E2LpnLDlWJQ9y9X4U7BoR0IUt+jftWYHngY8mfoKY hj2zR1ZcjBB6/GTkjEHJaUYiBQtaMXjXx9OTPSCHoJhdipNrVW892v+0avv7COOD6f9H voSfC8sJxd8Lss8qKs4/y/ypW71rO83pp0kjzrxvRlNzvjkNNGqYyu8VMPTvdEkY+ZWF csRNhMCW6uxibnwUG7VUQDwtpp/JHEjPvHqEE3yiosRACUNsBR5yg6hCy2kiIZqJOV8q Jlag== 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=62tivuwO33csoy4yCj3BPRdKFah2YmhyOm0vj9mrCFE=; b=YRn94zztm9wW+YrzvAYMsL7CC9334x5rcbIR1V8o2RffiijgeFGVoMLhJhOXeknL+F AwituoVkpfnn55DTEleHqsTVjd2h8JxYppJdsffALPpV07yja/tKo+PyCAsh8gzEPKIx PqlWltVXPEMhe9PzoxKWptmcilsA5tU5uWiZdJHXfqXk0k0wd/KpqyI+bfhsqvsIZ6J3 XfwoP0pFweIbq6YGy6n33OwWFfIE7k6JPQ0wAIgfk8ZLGZ9zb6Ok9zVF6VXcRmMQ0ZUD fCQc8FbuSphS3YN+z8y0aB1Br0nNbU7gUP+qms+VDbcPzNbA2MrPC7kUkbR7jl7M9L8T /+0g== 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 oz19si5555282ejb.93.2019.10.06.03.37.24; Sun, 06 Oct 2019 03:37:48 -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 S1727289AbfJFKeP (ORCPT + 99 others); Sun, 6 Oct 2019 06:34:15 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:45234 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727264AbfJFKeN (ORCPT ); Sun, 6 Oct 2019 06:34:13 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1EA89D08BB2E59D6385F; Sun, 6 Oct 2019 18:34:09 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:34:03 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 34/34] rtc: zynqmp: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:53 +0800 Message-ID: <20191006102953.57536-35-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-zynqmp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index 2c76275..55646e0 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -195,7 +195,6 @@ static irqreturn_t xlnx_rtc_interrupt(int irq, void *id) static int xlnx_rtc_probe(struct platform_device *pdev) { struct xlnx_rtc_dev *xrtcdev; - struct resource *res; int ret; xrtcdev = devm_kzalloc(&pdev->dev, sizeof(*xrtcdev), GFP_KERNEL); @@ -211,9 +210,7 @@ static int xlnx_rtc_probe(struct platform_device *pdev) xrtcdev->rtc->ops = &xlnx_rtc_ops; xrtcdev->rtc->range_max = U32_MAX; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - xrtcdev->reg_base = devm_ioremap_resource(&pdev->dev, res); + xrtcdev->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(xrtcdev->reg_base)) return PTR_ERR(xrtcdev->reg_base); -- 2.7.4