Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044332ybp; Sun, 6 Oct 2019 03:35:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzorsBREBvjFiHfX6gDXJn9/9vrFhSnfqHFFrDDMsySwoNDQX7KAz0CseiiNVHlcvMu/Eaa X-Received: by 2002:a50:ac0d:: with SMTP id v13mr23771477edc.189.1570358122426; Sun, 06 Oct 2019 03:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358122; cv=none; d=google.com; s=arc-20160816; b=ltfajonDndneMvSwB8QZYJBmfJtyPUae6JYAW3KEUPyQEr7CzgRGJRKXKhGHApLzst MlASaQz3CizZbc/LCKoHBFAozXhWwzYuXvdl8DCJFAfKk5H7N5au0Xc3Uk0HnTAih/VN p+JFpeSbMu1F7hZBZ0dXJXI7S+YZDDWI748gS7fBe3NPpbm79WgLv4pM6HIXvCHoyUHc KZ37UofwEyBvl/ta2PDntl9JxSEbNzdSmoBLPi6WBRFDyc0rqCRuGjvnPBMQ8E90tCaE vcCM+65n5yhgGGYLDDGKpChtgp6H573kRB7TpnVtnlprMo3gqnS9cflSN2aLT4tyq5T3 JsHQ== 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=m08/QxMbOdF1Oi5xp2naJSMjGOwstjY2/I/ZkHNy+xY=; b=bwH9y9CpLAVkS/vxp2Hcm8JNx6DC18BjLyrzA7GZaZg/oCUAjKmCrehJnni+Udt0X3 wdw8zbjX1aW+L+LJk5JfcfSlzQ2c95wJfgDf+t9yOY6oB5BBCyeGdpJybVd6ToQci7+P fLS92kdtOzlJfauXAGmHa1Qv/MAZqc5qNgcRi1t1A3upys72bPrAOb05yU0MgnSvsWBy Ok1ujGaddRKjn88N5fpeI2vawHAnIplPYIIFNh/J7/xf1Y023Yc25uqH7jZPXnjQNPbk F6LAkfyWQlxw2frOCp6WbHjDrU0Y+Vm+HdIuA5Ts0O3Zi9AhVqanJqyHGpCpkXRm3Qcj PlFg== 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 t18si5230526eju.329.2019.10.06.03.34.58; Sun, 06 Oct 2019 03:35:22 -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 S1727231AbfJFKd7 (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:59 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58610 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727208AbfJFKd6 (ORCPT ); Sun, 6 Oct 2019 06:33:58 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 555965A4B74E9BECAAD9; Sun, 6 Oct 2019 18:33:56 +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:48 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 30/34] rtc: tegra: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:49 +0800 Message-ID: <20191006102953.57536-31-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-tegra.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index 69d695b..0159069 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c @@ -277,15 +277,13 @@ MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match); static int tegra_rtc_probe(struct platform_device *pdev) { struct tegra_rtc_info *info; - struct resource *res; int ret; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); if (!info) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - info->base = devm_ioremap_resource(&pdev->dev, res); + info->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(info->base)) return PTR_ERR(info->base); -- 2.7.4