Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3043715ybp; Sun, 6 Oct 2019 03:34:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjjP4TEG6TSrDH9Ia7esWFTKmgdD3TfX4HotF7fyhrT8FM84MqR3LLWXuglxiWbyLRhbXc X-Received: by 2002:a17:906:5295:: with SMTP id c21mr19033943ejm.80.1570358070116; Sun, 06 Oct 2019 03:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358070; cv=none; d=google.com; s=arc-20160816; b=oijU5DSpcPM7rlUadn/6SCoFoX6BBNs1yMU7vuHJZBttMF1lIqFj6qKnpYw+cwd/TB 1xZiSbNMkvoSkroZcecKjciKCWtu/GF5p6SBrLCAC9PCBo1g7sqAINydSv16Xj6hwSvL +5D5DdL8LnGuaesMHx4tIDbJtOdtRaI5Tox9fnMjshtdIK4HWVi1UNK5Cmk/PQMI6eTF rVt5ffl2+J+EzJSeAQ7rV7rn5NVuACXP3TnOxW3/C6+E+3obADs03xCmJsOaa794Nvxz 6eKqb8LJ6csMz3FAUmji00/d0IO2Ie+ID8Jk4+gqHdz8t2/9Qn+u9cDTLvX1durX8pZ8 Ezfw== 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=3O48qZTGC1OhKJKgF4lw3uuHzZd1jUDDKRJNMJtQFRY=; b=SZkRZi/TkWYHPLO1hWahWExbDRql/uj54CphXadkn0LZDY+ks5mjGZ6fqO7hlwngeR PsvSAfn1J22nkWJ2YsJOUhGHD+4LL628C+B6biZb06thSLIrZ6vJ3+WYwAzzZsRCLdL2 M+NZjlAfg8SPjTRFaEHL9DdDAi75ZZ6MamsdP/Ui/ZCFfvV5mXqPx/ciqu69p5fUyFU2 HKu7Vcd1UQzoJgGXLwIpln/dIz1DgpKt4gmQX4cDlmMqayT/A14K8wYLNhm5RvSFQOwI 8HlP4xsLoY2v/HGzG3txRxK4hvmzZq6OhTybZ++MG4pfFumYvBEXqI7uND+pyE68ICnJ ++LA== 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 i24si7184464edj.207.2019.10.06.03.34.06; Sun, 06 Oct 2019 03:34:30 -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 S1726957AbfJFKdR (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:17 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44020 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726828AbfJFKdP (ORCPT ); Sun, 6 Oct 2019 06:33:15 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C08A8B84E3AD5F14C7C3; Sun, 6 Oct 2019 18:33:13 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:33:03 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 18/34] rtc: mv: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:37 +0800 Message-ID: <20191006102953.57536-19-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-mv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index ab9db57..d5f190e5 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c @@ -212,7 +212,6 @@ static const struct rtc_class_ops mv_rtc_alarm_ops = { static int __init mv_rtc_probe(struct platform_device *pdev) { - struct resource *res; struct rtc_plat_data *pdata; u32 rtc_time; int ret = 0; @@ -221,8 +220,7 @@ static int __init mv_rtc_probe(struct platform_device *pdev) if (!pdata) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pdata->ioaddr = devm_ioremap_resource(&pdev->dev, res); + pdata->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pdata->ioaddr)) return PTR_ERR(pdata->ioaddr); -- 2.7.4