Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3043785ybp; Sun, 6 Oct 2019 03:34:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZ5XyMlzgZTPdhCSflpi8TVwwvVQn9NG0ljw875bsDJmM6R1R81E6oUJHbHfPRTQASEZgR X-Received: by 2002:aa7:d995:: with SMTP id u21mr24109956eds.271.1570358075801; Sun, 06 Oct 2019 03:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358075; cv=none; d=google.com; s=arc-20160816; b=ggsDZ4Mqr/wz9SVNvm73bMNgzQ3+ymres3aEzVLJOb7lnXQwgJaw715sG0oLqVflE5 mtOtKj7qilNgOx8Mm0O7mDNXUbLR5fSqKbD9n99/yFcorjOrj088gP5eyadkMYEHvIKn kgL98Cs+bfGega4SnEDEcg3WNYW4OzPZ5ds/qWpjFg7Ut5pYUOMc7iZbxxO66cyu445C acYvrdZtGGLarFtynW3RtWHo1x4kUnD+AnSRMZw+JdsNolRGd0S+Z2FP8aQtjhRot4FB MHpSnELWb3AI37LZfInyHqZ0heRmriUGwo2/EZ43GMjFSBBbdC8L5HlDdJIMM8ZGfa7n eEUQ== 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=iUettK+z07IErgC78bYj5mN/A38YiYF4dOdzm7KqxNs=; b=PjmpVogyTbr8hPgWcOcXIjJaI8uu4kLR7Z09SUGiLluznreHEJ0lWyK2oQNwiuheQH +AFB81YBfxT4IlllAxSKV9yawRSMg2XI+mRK6j857pUYH7VGz4Hu+mfPBfg894L1/eLW nMglJpJEXiohlLrOFo1uPJQvFMwnxwNnqjTJTYbNdSCZGwdD67FEDdFs1pQx5rFCYXBT F3ugG4Eh1tQTHDPsrwVRFRL71ePgRhXUPq4NE0cttEK1KBOEM136c5KtlkMwlud5MASa E6qYCqbLpKA3IamKgClYgcuQ+KFkjoFcIgqTyFKmvHHfGQt+LjaXhI60vEb5LdJWwY9E G5QQ== 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 f23si5340726eji.266.2019.10.06.03.34.12; Sun, 06 Oct 2019 03:34:35 -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 S1726980AbfJFKdV (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:21 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3255 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726953AbfJFKdS (ORCPT ); Sun, 6 Oct 2019 06:33:18 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id DA992FCDF0D513A1386E; Sun, 6 Oct 2019 18:33:15 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:33:07 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 19/34] rtc: omap: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:38 +0800 Message-ID: <20191006102953.57536-20-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-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index a2941c8..988a4df 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -727,7 +727,6 @@ static struct nvmem_config omap_rtc_nvmem_config = { static int omap_rtc_probe(struct platform_device *pdev) { struct omap_rtc *rtc; - struct resource *res; u8 reg, mask, new_ctrl; const struct platform_device_id *id_entry; const struct of_device_id *of_id; @@ -764,8 +763,7 @@ static int omap_rtc_probe(struct platform_device *pdev) if (!IS_ERR(rtc->clk)) clk_prepare_enable(rtc->clk); - 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)) { clk_disable_unprepare(rtc->clk); return PTR_ERR(rtc->base); -- 2.7.4