Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3042996ybp; Sun, 6 Oct 2019 03:33:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRKnILLahKQGht0/uiUYSHTWFwTrJLsxnnaicvdQw80Q10BclMLDSe3mzdUi3lskqEkiZH X-Received: by 2002:aa7:dad3:: with SMTP id x19mr24154045eds.59.1570358013339; Sun, 06 Oct 2019 03:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358013; cv=none; d=google.com; s=arc-20160816; b=FCHv9r5Cu4m63DTaiLVB96BjVzBIrNpn2nIyF0KIP3TKDE6Jpl6w9imxYiI2iB7T1A 872yv4uNz5/Qh3HoonhIysbt2fcaSmsKKxHR3ASEddMiHoPivtNJx3Ea81xqwMJminNd WfIJyIGRwLj1AFuw9IZgahi0NgQqPwRcNFDMoliAVyEOAEDIhkvU+atG6t9n0lL2SfSS 1S95SfsCGOdnBaPfI3CZHm9a/60EA12X3fJUmje37uoH+1g7Lspt9v1JMGJ1AW/iF7WQ NKZOXNlgER4laq/kEN2DsLxZkCZLdBwXjS/dXu8/VAQ3bXvVgqV4at8fn5RSLHj62mdb F8kw== 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=Ht4qQG0+BHscM13pm5b/EvtY/Is+He4miw9Fh6gAy+k=; b=SXLsND+sA1CtO0r7F7KymlUa2xX2dDAftqR57BcmI9giCKTh6HGkHicVzhRtl4pxYw Bcmz4M61mGSt+tujWa8yv8D1MsQmFkUpjm4CkIjbecUw1K9PixkmxVvJpxBrPeNU/C9r I5SFtMYKXR36jwUC1QQuEUmE2bgUIWyaIFCVflwt6U0T6LYpEN2EUGza3E82sJFbFywm MW/NEiOVi+8o3JmnYpH1SDtbOVXMWiAWV8xcw3xrxEJRHPmfI8rLJOdnZFRCKHPkevWU AeBPaG2IT3GKbYvkFa6Wz5369wJgkghmZTosgXBFTKMNOvZwCam0DCN5Kqt6WeSB0kY8 O1WQ== 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 h13si6877806edh.242.2019.10.06.03.33.10; Sun, 06 Oct 2019 03:33:33 -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 S1726764AbfJFKcn (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:43 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3207 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726750AbfJFKcm (ORCPT ); Sun, 6 Oct 2019 06:32:42 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D26F8B3242B4552248AA; Sun, 6 Oct 2019 18:32:38 +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:32:30 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 09/34] rtc: ds1216: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:28 +0800 Message-ID: <20191006102953.57536-10-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-ds1216.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ds1216.c b/drivers/rtc/rtc-ds1216.c index b225bcf..7eeb3f3 100644 --- a/drivers/rtc/rtc-ds1216.c +++ b/drivers/rtc/rtc-ds1216.c @@ -137,7 +137,6 @@ static const struct rtc_class_ops ds1216_rtc_ops = { static int __init ds1216_rtc_probe(struct platform_device *pdev) { - struct resource *res; struct ds1216_priv *priv; u8 dummy[8]; @@ -147,8 +146,7 @@ static int __init ds1216_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->ioaddr = devm_ioremap_resource(&pdev->dev, res); + priv->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->ioaddr)) return PTR_ERR(priv->ioaddr); -- 2.7.4