Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3042693ybp; Sun, 6 Oct 2019 03:33:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwo9uVWDJETHBhVuW7iSHot9kWQ01gl0E+IZWzh59WeihuHYulKaqhL9l+4x1GTJM5Ou7yi X-Received: by 2002:a50:be87:: with SMTP id b7mr24340772edk.37.1570357993022; Sun, 06 Oct 2019 03:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570357993; cv=none; d=google.com; s=arc-20160816; b=LICKiy+Wi/a5ztYbyTZD1bXDNuYPLy8+QS1h60MGpAfSYBWiZkZYrPhdKc1G77D8p4 RuGWEt+ytL8L9ZaK7NA1IUXPEI6Tih+NMLl6giFKdzWddFM+bEKra1EjcfKTc3uhpNvk gB9nIzoLwHevFmBZUXDiT3HQL5Bj4S+6DTu3IRY0Q56+nvnkwwvbTME33S5/QD8Ynjjz DTcyGe26orN4yF4lO6rI9esP+bkY3WdcOuabbVVqE5+fiblsheiSSFQ15C1xVCaNyZbd CI0Z7QrktYnbasCD3NxTJe10DXEWu37kGmhYQ1JRNl3BZfeyO3y4JtQ2/ocaGPses/t2 DqSQ== 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=09l/ODJSvoGcQNCnzPE/I+oKaYQ+ZUC/ct0Wf9aIB+U=; b=M6J75K8nJ2+BZSVd1GRIEy4qzFE1oxyeIeKRCplSTCdnzxOomgUg+mAJfWXTOpGQZQ rfsKspcA+hamKXOAg4MAAfL+rmiHVB+chloGWwR//udJg1N7cvS+sHo9K+IYdbO5dnyu XR/WpckMJ4Y82ry1xqh4j9OCwinDa1A4sYIuykQVnGYPP21fycVu+pmE18sAn0GeYNjE 6U/5M7NkVQV5oPNioye3muvlu2l843/yRUlix4wEEpPMb4fREI4jSVShKm2YUsYeGQkh /ACkYtmYRCVVQfbJvlE3im5SoYOxo3HkZMAs5oYUMkQGGAKv3UvuQSeGGOwNvXvcEAoX GBaw== 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.32.49; Sun, 06 Oct 2019 03:33:13 -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 S1726699AbfJFKca (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:30 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:43066 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726593AbfJFKc1 (ORCPT ); Sun, 6 Oct 2019 06:32:27 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 54D22FBD94350DE7862F; Sun, 6 Oct 2019 18:32:26 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:32:19 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 06/34] rtc: coh901331: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:25 +0800 Message-ID: <20191006102953.57536-7-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-coh901331.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index 4ac8508..da59917 100644 --- a/drivers/rtc/rtc-coh901331.c +++ b/drivers/rtc/rtc-coh901331.c @@ -164,15 +164,13 @@ static int __init coh901331_probe(struct platform_device *pdev) { int ret; struct coh901331_port *rtap; - struct resource *res; rtap = devm_kzalloc(&pdev->dev, sizeof(struct coh901331_port), GFP_KERNEL); if (!rtap) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rtap->virtbase = devm_ioremap_resource(&pdev->dev, res); + rtap->virtbase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rtap->virtbase)) return PTR_ERR(rtap->virtbase); -- 2.7.4