Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3043886ybp; Sun, 6 Oct 2019 03:34:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8ke3hET9R/45UAG6hnFMJ3dAmqp0MvTx4yGaJmnZhUuWokyZXu/wWbbuOah7LKwLh0HLc X-Received: by 2002:a05:6402:65a:: with SMTP id u26mr24014050edx.86.1570358084973; Sun, 06 Oct 2019 03:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358084; cv=none; d=google.com; s=arc-20160816; b=MbmwmeW6C5vUUtV7URPbtR4jzoZ+zNdC66FmPeuBoukJeRuVwUaojl1qdtvZAWU8Hs dInRKWUVrQ7a7uSghCPTDdKwRb9F5t7PO1jHWCLDSHBICJjGel7WTmh9y2w2L/daNWGN BCbPXg3DghxtpFIHk/pykjjpRwOHXZgKtpHJqavmqfLbqO7QlhV3KGRdqitOW35a5+Bt kysIaWwutg6YAARiMJJvyIopD9YQS8vjfaSrcfqb2BOK/vuAwiGnE9zIT0MJhohz90Vt mHTIT/RPsVmjF5FFkl2iEe8POrE0DwjvPgQQw/8YBRcRSKLYKnqdGhS40SU0M89yWq1o Iqww== 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=+t7YDBD4j0kTmM1SqUt57qidB8z7rtVE3B1Eur56ZpM=; b=irn7lthjcaVYU0H3cJLMjWwFAfqm7noQ9WlXiS7egaL3SAs/H9lMJB6THDzeSBOxuj 4LiLbGiS7KqqbQLLdpFWzP7NllnvRY+Ohnd8wmcFP8tkAcndIJTsRomCjmwJfMkGfynN G3bnzSZGdPdA/mma5w7UgdzYcCebmuS8bYehg99nKgPaSWUHvHaWBmAeluJTPwQgGq7K 2emOJB1hwVWkmugrRib/qy9adnOx8K/m2fsQxjborzCkPAb/Gg6V/smj0INysibdqKxh ImWUkQGjGVtlTR1YqyNf9PStl2bZFEAxZAwcvZXQUWHOWbarqK0ZIcLP8h0wr09IYtcJ nFmQ== 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 f33si6749790edb.281.2019.10.06.03.34.21; Sun, 06 Oct 2019 03:34:44 -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 S1727058AbfJFKd2 (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:28 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3256 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726953AbfJFKdZ (ORCPT ); Sun, 6 Oct 2019 06:33:25 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 14EEDF1FC8904C5BDC6F; Sun, 6 Oct 2019 18:33:22 +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:33:14 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 21/34] rtc: rtd119x: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:40 +0800 Message-ID: <20191006102953.57536-22-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-rtd119x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-rtd119x.c b/drivers/rtc/rtc-rtd119x.c index b233559..bb98f2d 100644 --- a/drivers/rtc/rtc-rtd119x.c +++ b/drivers/rtc/rtc-rtd119x.c @@ -167,7 +167,6 @@ static const struct of_device_id rtd119x_rtc_dt_ids[] = { static int rtd119x_rtc_probe(struct platform_device *pdev) { struct rtd119x_rtc *data; - struct resource *res; u32 val; int ret; @@ -178,8 +177,7 @@ static int rtd119x_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, data); data->base_year = 2014; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->base = devm_ioremap_resource(&pdev->dev, res); + data->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(data->base)) return PTR_ERR(data->base); -- 2.7.4