Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044923ybp; Sun, 6 Oct 2019 03:36:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSktFYdCRJWO8wLJWEqkg0ulW7lH618tF7TzVM6F8uOrNvqt5KcUEPW5NKwf3GWcE7RF0G X-Received: by 2002:a50:a666:: with SMTP id d93mr23766271edc.217.1570358170449; Sun, 06 Oct 2019 03:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358170; cv=none; d=google.com; s=arc-20160816; b=cOchUkj5l/jtvyuIfS/5sKqLMyt/w4A+vNj3HFgm0eEpmZSStvLGNCVvtLNTMo1w/8 Q6iQGPgHu9mCA882AvHQ44pDO9VtJFwe4Hn/xTvp0/Qo2+fSz2bDtKVf/Jr12EZUMWwV /n21CuqNYfCa5UDXEjNOgPzAbmtrL822DQ2IHHXVAxtfopZIPL7aofYQIIxbM54j0LMi lBaaLNaIQjye6uObKNk4HFxlHnyyGfeEkQWbZd9PfvJpXQ5/d95CKItJkhpqWnBYs9Mi BIdZHTe60hWmI9vmjdA4h7MP5weHEtLh7gJOcNRJt0N9Eo19d7ZZNJdru3dlxXQp/WGW aldg== 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=Dv34bDFCWItq0xBgHGEGN5qL/XitpqKs+oXnBu9ehec=; b=nP2CGgdSFpL9NxvGCuEPcHk4CNJTTLD6yBvUl1QackRJSVWhTQEeVCaNGIOAh1rcIq y8079vZF5+mB3Txljm6gtSGnj76TqevfnWWd8gk+58HXFbaPxiUTqbSmh09aaoeWOGjX 3RSslYGcf6mjtpmTPjUIGCT+fBJGi51H1b7q+PVb744XPM/Hkec4P48+dNvEGtMUktab rio92PX1TFSIyTHIpWK6QV+52MD6yHNY8yTgJeU066kJG18i/O37mBdtR/8bpabSRC2L tWgfzdlaI7+IdjxyX2jBzsppffBxeWNNZhg3fb5OfjlLueq9QcnJo0pqM/GdIaKLSkyY KVzg== 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 h19si5686571ejd.142.2019.10.06.03.35.47; Sun, 06 Oct 2019 03:36:10 -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 S1727176AbfJFKdu (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:50 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3212 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727169AbfJFKdt (ORCPT ); Sun, 6 Oct 2019 06:33:49 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C7DFC4709964F18BACA1; Sun, 6 Oct 2019 18:33:46 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:33:36 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 27/34] rtc: st-lpc: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:46 +0800 Message-ID: <20191006102953.57536-28-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-st-lpc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index 49474a3..f1c5471 100644 --- a/drivers/rtc/rtc-st-lpc.c +++ b/drivers/rtc/rtc-st-lpc.c @@ -186,7 +186,6 @@ static int st_rtc_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct st_rtc *rtc; - struct resource *res; uint32_t mode; int ret = 0; @@ -210,8 +209,7 @@ static int st_rtc_probe(struct platform_device *pdev) spin_lock_init(&rtc->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rtc->ioaddr = devm_ioremap_resource(&pdev->dev, res); + rtc->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rtc->ioaddr)) return PTR_ERR(rtc->ioaddr); -- 2.7.4