Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3045113ybp; Sun, 6 Oct 2019 03:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGfuW39x9N2dzFLadt0jJ/UBK8wG85m1qo7qpCwN2goSBuDB1428TIJN4v6xRjLLWSR9So X-Received: by 2002:a17:906:2ec8:: with SMTP id s8mr19908718eji.275.1570358184776; Sun, 06 Oct 2019 03:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358184; cv=none; d=google.com; s=arc-20160816; b=W2vrBjaQqtMjMtDe4sSjljNpFVyxrN6BOCql9y2eoubsnIDrv4336mMLyuLM0a0QqN csZnRjOWvitUBSUwUdvE4Wxf4BIVvYfzpI60g9qvnpqHCNRNfmZ803rnTkPVYEsFcVUz 7W2BLjLqBCQJ5UBrMJK9urDH6zMwiNwc5mQzF+90YsY8Vw4o+4W90yZrzU3a/GLvXbLG eHDXRZoSPSffHo9hHWRhntHAIxIAi3MUVuBrqjztDhRg16DYpD/rz481ACtHUOXqRN/M Er+J2a8C2WthH1LGIbgFScUat0ETTmGH06ehFQOLnswlk3YxPlgeT5vuG1+wOLpIlAzD dw5g== 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=v/Ro6Q6JO7vQRre8rpqZicQRRIf1G0VSAGwf7ZBgLQg=; b=wUZUtqYDT1x3TD2V3KH65iAPpNFJaOtzdS49XXBuN1SBM53UJV07LhrRMqLzMrNZPM sENbRiQJlWwkxilJYrrxqMAIh97EUHazCmJv9ZEioUfK+Vtg57HRLJBKrww/mTnPADf3 3m9IqMIGBlEXVhTUY3OdCIA2vY0D2HHZAbMAfQbrr4rqYMZfqrGn52ZUdZTCi3H7/zex ZMeh5Thde0zp2nJZCWW460BO3bisiY2zwyKcxzvOBsJeOINB2yDUNdi+ZchlS6gUjWLo 4T6bcT7r9v5ySKIiZLjmNTk+x5IDp2ucsRmlbsZTsvaREec5ahLOCpU+JX/tcQHRyWsl Z03g== 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 r8si5489463ejr.33.2019.10.06.03.36.01; Sun, 06 Oct 2019 03:36:24 -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 S1727082AbfJFKdc (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:32 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3257 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727040AbfJFKd2 (ORCPT ); Sun, 6 Oct 2019 06:33:28 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 02845A211F9171034FAE; Sun, 6 Oct 2019 18:33:26 +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:17 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 22/34] rtc: s3c: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:41 +0800 Message-ID: <20191006102953.57536-23-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-s3c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 7801249..e1b50e6 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -444,7 +444,6 @@ static int s3c_rtc_probe(struct platform_device *pdev) { struct s3c_rtc *info = NULL; struct rtc_time rtc_tm; - struct resource *res; int ret; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); @@ -475,8 +474,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) info->irq_tick, info->irq_alarm); /* get the memory region */ - 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