Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044884ybp; Sun, 6 Oct 2019 03:36:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNxcbMZFkOhabslmbd4UP4OTtcsaeBHW0bKuppYG1jQuiaz/PWbC/1EiDmVS/PJLbFvN+X X-Received: by 2002:aa7:ce8b:: with SMTP id y11mr23815254edv.231.1570358166722; Sun, 06 Oct 2019 03:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358166; cv=none; d=google.com; s=arc-20160816; b=yZhXnSdTJqiaRVP7/SDm3NaHISVMCcEk1h94S7UzuiUuz0bzK/KCXgTzsG7LK3YJIo z81zmJLdHbU7PT2hG/V7J4+dGlXxrVVACvQOon8DzftzMegzD9KHPO0BUFcC7cUEKHrJ u3B4W7j839MHAGc6mqvCTDJVwNpDjEUTE9k7TNQHonZAujmRk9YBgtbTZydCplzvpfHB g8BKDuTDaaWCrXmOxCUS1clrQz9npuB5Z02IQ665ckk+/+3NP/VRm9obMOroE4aCb6RE a8TFe0KtiAtLNWIHTaAywAuV1PS48jw2BecG2nYF/98VBqt44Gw4FDyJk8if17iJXi85 OGHQ== 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=fVPjg+ZK6LxNObggyjFXrIS6lfhQHkAiyfOBYwqu44o=; b=ESXHA5Wx5RqQ/SS0lKsgE80pwsC3h8lXLqXQI+UfwxzV9MbtyP/M4bl/PY5JSdS6n3 cEDn0i3+um7VoeH9/IqAVDkUHL/eAafkvpjS2MIMX8ybOCeOL/tZLx/Yiktu4OeGOQqB WpkQXgn75sd83KW/0gS6axzSl6LXShxLTQYs17Xc+zdzCicmXR3Ui3vfSeT/PaEPCSkh DGHI8btSQB9XyEMaWBmOkjGie+WrUNhOdlbROsRSAvVkDhZ6qNLkR+3BmiQ7DqfiMyxd DRUvXAcK0mlKnxPkASmbMMMeaoWObsDUQkeP5e6l+RWH3h6gVCjcXtYBEMrFhGCz/s07 yurw== 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 f7si5587508ejt.155.2019.10.06.03.35.43; Sun, 06 Oct 2019 03:36:06 -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 S1727010AbfJFKdZ (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:25 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3211 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726984AbfJFKdX (ORCPT ); Sun, 6 Oct 2019 06:33:23 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C92F8C8BB3CA3C0A97D1; Sun, 6 Oct 2019 18:33:20 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:33:10 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 20/34] rtc: pic32: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:39 +0800 Message-ID: <20191006102953.57536-21-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-pic32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-pic32.c b/drivers/rtc/rtc-pic32.c index 17653ed..2b69467 100644 --- a/drivers/rtc/rtc-pic32.c +++ b/drivers/rtc/rtc-pic32.c @@ -298,7 +298,6 @@ static int pic32_rtc_remove(struct platform_device *pdev) static int pic32_rtc_probe(struct platform_device *pdev) { struct pic32_rtc_dev *pdata; - struct resource *res; int ret; pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); @@ -311,8 +310,7 @@ static int pic32_rtc_probe(struct platform_device *pdev) if (pdata->alarm_irq < 0) return pdata->alarm_irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pdata->reg_base = devm_ioremap_resource(&pdev->dev, res); + pdata->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pdata->reg_base)) return PTR_ERR(pdata->reg_base); -- 2.7.4