Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3043117ybp; Sun, 6 Oct 2019 03:33:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfve+hn8Kr0ceOmM8+M9uYF7te4jBEOtBGmaeeLS6XP54l2qTaGCdAbyyyJmwzWR1jlBM2 X-Received: by 2002:a17:906:7e06:: with SMTP id e6mr19229276ejr.149.1570358023929; Sun, 06 Oct 2019 03:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358023; cv=none; d=google.com; s=arc-20160816; b=B2YKEvXv16aM3E43IMJaR2Qkku6TYrARnmHUvIcfAfk4KxFrzlIQH/kWbnAkGoHuNd +0fYDAEFGG5cEHWH3N4S4YiXZhzWlAjTQgnj4dMsXp92rSi8PJ0v1f/es5cQVvCnneoy BjxJSj+eo2YP2CkAGdiR6IqhfTNfGaPS+CXGD6d5Qi1ZIdQMJ6DgoohVue9SYu+AnseB J2tjwkIn2UFv2UItFnfhfBurZ3Zzm9v4WfpgS7PnSDIr6/s2Ee0MEb7qXxpIkYS4TcrV 12imozXyf4b1VW4XcOv8bOazA+0lsLS2gR7+8wcY0792FC8GcbxZzuE4jo3lvraWEjRm p65A== 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=RZkljFVB1EWQS2NruRj8RfytHvsd5+PGGg9lOi/4utE=; b=C06A3nO7id0mvWHBIETTWq3VxmuyMlMtlPBsh8J1SfX86ZGtdffJQxJ8FA55wx4fId 0488PFA8koJRiCnvuRwzM8FCzsvSgI5CvGOdS5a8asLiDTYH7aHItrmTeK6K1lE0w+sK yy77Zhz2361KmqKJLPIXTAz7CYIsq5xScA8wdluaABr5uAXegDMqO6GYg0zkrZFtyRdX XcHir0cj9GeCJWc7tjaFQFZ3z3ysAzPuxvSYxucy2UewECp00igAuZiHU6b0HLtTS5Gg 6hrDa65X6jRSvnLaWC5Yqb3bwHDXI3wCVyaBN6FQeZzv5U2y7yiExZqEWFcUjFzYWKCk 5PZw== 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 g1si5398553ejo.82.2019.10.06.03.33.20; Sun, 06 Oct 2019 03:33:43 -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 S1726777AbfJFKcs (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:48 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:43382 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726444AbfJFKcr (ORCPT ); Sun, 6 Oct 2019 06:32:47 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1E90A458F908C584EBC8; Sun, 6 Oct 2019 18:32:44 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:32:34 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 10/34] rtc: ds1511: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:29 +0800 Message-ID: <20191006102953.57536-11-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-ds1511.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index b6a4775..a63872c 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c @@ -414,7 +414,6 @@ static int ds1511_nvram_write(void *priv, unsigned int pos, void *buf, static int ds1511_rtc_probe(struct platform_device *pdev) { - struct resource *res; struct rtc_plat_data *pdata; int ret = 0; struct nvmem_config ds1511_nvmem_cfg = { @@ -431,8 +430,7 @@ static int ds1511_rtc_probe(struct platform_device *pdev) if (!pdata) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ds1511_base = devm_ioremap_resource(&pdev->dev, res); + ds1511_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ds1511_base)) return PTR_ERR(ds1511_base); pdata->ioaddr = ds1511_base; -- 2.7.4