Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044963ybp; Sun, 6 Oct 2019 03:36:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqymanqkQXMPUNE//O/rsSn2UdrthiD0LzG/NU2J3Vi1DAfOeaNsrNsUs+y2YtGIfD74ggvC X-Received: by 2002:a17:906:b6d5:: with SMTP id ec21mr12006532ejb.331.1570358173953; Sun, 06 Oct 2019 03:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358173; cv=none; d=google.com; s=arc-20160816; b=bqKeTLMjHRqFGFYv+jw/NXsqphAgwu26VLCPOHjy8DaLthb/DrIXI7lDmyyN9NmLMh HRxrqgukfJ8Cmf/HTSeJWtsGDt7NPYbPyMF/yMMep7MdhKfBnTWE7TuYRZso+6kgI18L vldCBSeYqvVtBS3QLtylnYKdcEpuanOVt/OoPpWH4W1SorIvV9FEKfw03NBSwaWoiMDF ho1pG4PYT4f3AFlqgzgFlUhw9fvnKWJ3pVsDxCjNLiSvaKAXhW7NEH2xzYkva8LN821c qjP0jexNUrua5ae3ykASSyxjH5oFRNyQZ1/TlDiKMMVQJJCg8ct8aE+jtycKzRePXnRv OAtA== 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=Uz1yYWyA130T9JaKnw3aZg8lpyyHVpbQSZg8tXNiuCM=; b=ZNr2UJ7wVvJTwUsc9vSZyY6dD7mL5DtRxItNQboskpcREzsBQUiT6eqrbnuv0FMdTH 5Vd1WpSmKPy8RJtMWU0bK02MbKCxmAOvOMgNDLtTwq5vdMuwS9fMSMMvxFzYu1TutBU7 Yd2j2rafU3Athd+wo3WuysIK7qg9jgM8l+DsuTlJfqox97vRuLy2nM34rMVnheiA23s5 sjYlRmRCcCGb5GSc7Wl9CsxoNWr8V9m7p4T6hOYFhKzuuqjWjALAdmtUxtD5fEx1ho6E k684HPjjqoYDNeY7xrNiBIH54wByzejOqLFfJkFSDyhcV85dVylg2iVYxNJNOWmhPq3P NWRg== 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 r17si7675048edx.257.2019.10.06.03.35.50; Sun, 06 Oct 2019 03:36:13 -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 S1726788AbfJFKdf (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:35 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44376 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726757AbfJFKdd (ORCPT ); Sun, 6 Oct 2019 06:33:33 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 89A40921179535AF2E63; Sun, 6 Oct 2019 18:33:29 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:33:21 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 23/34] rtc: sa1100: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:42 +0800 Message-ID: <20191006102953.57536-24-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-sa1100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index 86fa723..d37893f 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c @@ -252,7 +252,6 @@ EXPORT_SYMBOL_GPL(sa1100_rtc_init); static int sa1100_rtc_probe(struct platform_device *pdev) { struct sa1100_rtc *info; - struct resource *iores; void __iomem *base; int irq_1hz, irq_alarm; int ret; @@ -281,8 +280,7 @@ static int sa1100_rtc_probe(struct platform_device *pdev) return ret; } - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, iores); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.7.4