Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044893ybp; Sun, 6 Oct 2019 03:36:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxB7b44tyhubFeFprcTDK4gSDhG8I/weY5W4WyvED4B+ivaSDq/DUdCRn5ysdIurQ6gTNak X-Received: by 2002:aa7:d611:: with SMTP id c17mr24475460edr.196.1570358167429; Sun, 06 Oct 2019 03:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358167; cv=none; d=google.com; s=arc-20160816; b=tOSKgK9LR0CvLm/Flq4pFhQMhSAlNc2T/t+HpGcsR32Y0xk97VPVSG90lZAPaT4w6l eBX1AtReb3msa+1cdcIZ34X6xGfNsIfzbQzmobJE5WdqerdegVsQTLrJPaaCVg9Ula8U gT260EZ8BXMqH1gNbygD+AU1FOo1KPGjkES4SmhhxIfi3d8Ecnx4pNm2ctKvi3DwEuwm 9QY27QSNUmHaFLoD2c1y31YJlej743SX2ihFwfZWG8oxP7gfu344Rh6FkD1mfkMaQUFU 7Kf1hKYPGKaevVzDIvGZ4e4EuUHI2LH8umb49s51+oiR+1JQYHqQP4b88+t5hLuC9qN1 v5Qw== 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=lvnZ0OWqHn4UUT1q9fv/eupeadOuQK+d4OGJoZvWYls=; b=SR4/zHTjJHeN3FNzIX4pTHVOP6/nO0ONEboae0HpVVE1jrTkfHp40I9cbKjZo0ifww J8y4N7gO/RiZgb3UpN2E+BRW3Cc3BRLVxWhzNYhyp28t//ymDOefKzFGvy9A7edYAvQ5 DJy9Fgb/KXzn8AkWs/aJtufxPKSSfEb1yRmh+MQeQo1Qa4lELaMH4mRgWVbAZtHPsSUc CK7W7DCUPDbtPssOM26XQJgxi8tDA+SSlQ4DodXvFAj25CRwbQVgRbJwVzZNFThq9+Pc l3fJ8BlNa5HCEePzA/XEGyoLktNUUqex0Ec146qJEL0fP61a5kPUIgW3PC2o6A4eEXuQ Ljug== 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 o14si4165476ejc.421.2019.10.06.03.35.44; Sun, 06 Oct 2019 03:36:07 -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 S1727262AbfJFKeK (ORCPT + 99 others); Sun, 6 Oct 2019 06:34:10 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:45068 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727250AbfJFKeI (ORCPT ); Sun, 6 Oct 2019 06:34:08 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 18EA8E99386BAB02B13E; Sun, 6 Oct 2019 18:34:07 +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:59 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 33/34] rtc: xgene: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:52 +0800 Message-ID: <20191006102953.57536-34-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-xgene.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-xgene.c b/drivers/rtc/rtc-xgene.c index 9683fbf..603c4e4 100644 --- a/drivers/rtc/rtc-xgene.c +++ b/drivers/rtc/rtc-xgene.c @@ -137,7 +137,6 @@ static irqreturn_t xgene_rtc_interrupt(int irq, void *id) static int xgene_rtc_probe(struct platform_device *pdev) { struct xgene_rtc_dev *pdata; - struct resource *res; int ret; int irq; @@ -147,8 +146,7 @@ static int xgene_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pdata); pdata->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pdata->csr_base = devm_ioremap_resource(&pdev->dev, res); + pdata->csr_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pdata->csr_base)) return PTR_ERR(pdata->csr_base); -- 2.7.4