Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044913ybp; Sun, 6 Oct 2019 03:36:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXi7npksY2UwQqKOSDPFn45/pk+RlAFUO+/E5NcMMsWGlllJ3/REpH5g5Z7uWW51fNyk8E X-Received: by 2002:a50:87ca:: with SMTP id 10mr24125798edz.77.1570358169449; Sun, 06 Oct 2019 03:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358169; cv=none; d=google.com; s=arc-20160816; b=R2z/NpeFrYaQQt1A3B2hlYYRINPjmNeksBxb+3XFvAbNo6CHMPaEnULJFbJt/hNvoS b+rjlU9w2J6djzA0CcMO9SXZBkqYcmpXtoLJTJSEoprAbQZoKnpcTok0T4R0koyR29up 7HHGtihFySv33hUPNruPRwAfIhQnr+xH3sdyEqVVa1A88dRXBGR3HMxa3AUegRtJRdiy Z0aVu30Apx6UniCoUi2Z6fgxzOBjf4c68mciBpvE8miA7b8kEvPD4pGlBNUOO9kboyGy iQQ8GRvRE5ZXZXziTMFrm7CwrutHGqSIEdneXrqrbjTMI5kMZMM61PrsDHauOf+LcqHA lOWw== 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=Rx6QtXi/sGIjFxoA01bS86ceDmTE6UW/qvm+wy9IL20=; b=oqqKp4fcnby8tMBQYDMeQLw7ikJ+p8VDBaZEBLQxWb17CCjrtUSfH6KEMm0XlHK2i4 tfxqHhMZV3UPxfO8r5FQUMuNTmrPwh+X97cKLJ139KRU6RU5yS1/G1TGjixXTpU0Rdkb /ii+ER6WoQ3hnTE/b5YD/D5giLMN2L3WetNid5I3IQcIwOEaflwmGCXzTS9qsQoG8CaS MRBufd2npq+wHcRdjUovfUmNyGksFIKNLmZJ4o1PRD8NJa4ubSZxXCKrMQ/3cLwDDqWS W9o3Yl+AGXHbI4G1XTEeWsSynA00FmCw5uGcHJ2K+Z+m1Ku/pr0m1laX+mMrBno3zrf+ P4Ng== 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 x25si6714201edd.350.2019.10.06.03.35.46; Sun, 06 Oct 2019 03:36:09 -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 S1726890AbfJFKdG (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:06 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3210 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726827AbfJFKdE (ORCPT ); Sun, 6 Oct 2019 06:33:04 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6235D1C1BDA982C36938; Sun, 6 Oct 2019 18:33:02 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:32:52 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 15/34] rtc: lpc32xx: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:34 +0800 Message-ID: <20191006102953.57536-16-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-lpc32xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c index ac39323..b6a0d4a 100644 --- a/drivers/rtc/rtc-lpc32xx.c +++ b/drivers/rtc/rtc-lpc32xx.c @@ -185,7 +185,6 @@ static const struct rtc_class_ops lpc32xx_rtc_ops = { static int lpc32xx_rtc_probe(struct platform_device *pdev) { - struct resource *res; struct lpc32xx_rtc *rtc; int err; u32 tmp; @@ -194,8 +193,7 @@ static int lpc32xx_rtc_probe(struct platform_device *pdev) if (unlikely(!rtc)) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rtc->rtc_base = devm_ioremap_resource(&pdev->dev, res); + rtc->rtc_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rtc->rtc_base)) return PTR_ERR(rtc->rtc_base); -- 2.7.4