Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3043179ybp; Sun, 6 Oct 2019 03:33:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbbUCLZA3K7rJ/KVLSLC+I0s0gr3G1MtfmuJlkWL2G9L2yaNB13hEnGf3ZTQLiSgaIBlGt X-Received: by 2002:a17:906:d926:: with SMTP id rn6mr19024823ejb.175.1570358029242; Sun, 06 Oct 2019 03:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358029; cv=none; d=google.com; s=arc-20160816; b=FvAptQztrln1pbpni4FoSfh3Zxl/jpz4AnIclCtW5DTLUjH3ENZhDKuatKhOjvkjXr AK8llIcJiJIfCm25YIIQYx3ACj4GZhD68pgkgoZnj+Hwp8qH00ltUJ81xAAgeYR1FqvP TM1gtHWa7q+l+0grUpCqBCpxMX7+MCYBnUNzpqBlSxKCaNkHfaXBEmPBIXuWCvFLvxoj XwipkN+bFWW5UhEAUWR6nRSOn0z7nrK4CXV+ac2DFsMbyruq2lafBK/r6TuLSmRvalq/ PBhsDbV6sF2SvNb7D7U99jsl1u9f8pivohQZirzJiY6YRwGg2XLKYC7yGeL8QqiEmUbQ +YnQ== 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=39lgcz9gG/ehnB7I7vyCdI3fI2vI8seLOF9p+tfoHzA=; b=Bt3X0hfwgWc8chHFOyCa47lgCyXuOGZP4uVcRzvytWWk+T7+6EIYUMSg2sbv61jQ+l HPjpvkWys4NCOXQxfx3mc2qfMe5bl8J4w9qGgFKWZZTYFDajb8VWBr+az9fSdbYSjXdn Ja5VNyM4F5PBVjkmj+F5SPsJ3LXODPSPlHrwRsPB/Ui+qYdXr+F40c8ELlRPFMwgx4Bf /S3/5GLFJVeKN4TeVoQ37OzjWm0Zqze8wiLZTPv5hjdbUxrOe2e25jNpEl4P493tcYQf 83lKRDE4iXObl/EhwRK4uSGJmbP98Yg0Zq1J64Ks/tZ5eiDhv1HTlGit98NK2zSPexmu VJ7w== 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 17si5493198ejx.213.2019.10.06.03.33.25; Sun, 06 Oct 2019 03:33:49 -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 S1726797AbfJFKcv (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:51 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3208 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726670AbfJFKct (ORCPT ); Sun, 6 Oct 2019 06:32:49 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 99A32D975090B94E3882; Sun, 6 Oct 2019 18:32:46 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:32:37 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 11/34] rtc: ds1553: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:30 +0800 Message-ID: <20191006102953.57536-12-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-ds1553.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index 219d6b5..cdf5e05 100644 --- a/drivers/rtc/rtc-ds1553.c +++ b/drivers/rtc/rtc-ds1553.c @@ -249,7 +249,6 @@ static int ds1553_nvram_write(void *priv, unsigned int pos, void *val, static int ds1553_rtc_probe(struct platform_device *pdev) { - struct resource *res; unsigned int cen, sec; struct rtc_plat_data *pdata; void __iomem *ioaddr; @@ -268,8 +267,7 @@ static int ds1553_rtc_probe(struct platform_device *pdev) if (!pdata) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ioaddr = devm_ioremap_resource(&pdev->dev, res); + ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ioaddr)) return PTR_ERR(ioaddr); pdata->ioaddr = ioaddr; -- 2.7.4