Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3045684ybp; Sun, 6 Oct 2019 03:37:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUls0Bm2MyzQbaUrnqn60LxJeYvu2537O7TNQVIV0FnBDYFAUHyDoBScBBpeKRrQcwm7RI X-Received: by 2002:a17:906:164d:: with SMTP id n13mr19434475ejd.75.1570358230236; Sun, 06 Oct 2019 03:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358230; cv=none; d=google.com; s=arc-20160816; b=gxepP1dDz7GlaVZlac0q5LL4lxl+Gw4+8O14aQZgob8JuqOMFggsgAJgQGbKT63VCT mh+R+T03xJ7c72UpaivmLqKst880GinJiVU7sVkfXwTZdiT28/t6jvNkpj7SObxgkTjZ pFkgbfCLJz8et7KB0QK/0KgY60NWS/p1e8G45MgjcM47eBKBd9P840JEYcDAOXA8rxgI PzCeX1a9Db1J5zChWKVSzPVb8Lo5AqEhwWh0zEjDbWcFDwwq9byoZEHsRa8oer3RaPLv U3hBoLyS25a+s7OMosPuRgM5Uh92kTA/1kfx5+O2gsRKaL3Wdx2J5fO6cP8zsWUrSQhY jbEw== 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=0bor+CvGdWhFj5vXDjzWM4h6bqRl1eavmR8/9ani4kI=; b=LTre/BBdAwELgAJtA141maIbqo/ymOtKuOlIeQSqtXo5i1YiDs90UXqbEWSvSgqPc1 uzOYsA89ZNlq8uwwQINbTuua/9nq0Y9kQ2go/8uv6FYUb88rOPSmDPESY/+SIdXfUi9s hVulTsVA3UtvwbMyew7XcUoxPNPTAOFBP8smSChxuwk3K3hSPLfdTgQPNJHQe+uty56c oQoi21tWHqMRdqu33xojHUHwKlrhU8/eC0UJpGPFm0Tn2Rul5qrrMJHjdmYzautGY6m5 UfLo17VY+J/rB01plEbrFOR+42/DolesoKR0dOBPSLuLWQ0FOgnbiYdU+gyEuLKUfDKz VFVg== 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 i34si7465854ede.37.2019.10.06.03.36.46; Sun, 06 Oct 2019 03:37: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 S1727191AbfJFKdy (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:54 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58428 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726444AbfJFKdx (ORCPT ); Sun, 6 Oct 2019 06:33:53 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D92C7C64583A82678068; Sun, 6 Oct 2019 18:33:51 +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:41 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 28/34] rtc: stm32: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:47 +0800 Message-ID: <20191006102953.57536-29-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-stm32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 2999e33..781cabb 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -693,15 +693,13 @@ static int stm32_rtc_probe(struct platform_device *pdev) { struct stm32_rtc *rtc; const struct stm32_rtc_registers *regs; - struct resource *res; int ret; rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); if (!rtc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rtc->base = devm_ioremap_resource(&pdev->dev, res); + rtc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rtc->base)) return PTR_ERR(rtc->base); -- 2.7.4