Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044241ybp; Sun, 6 Oct 2019 03:35:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxrotADgW2CmHmRpx8Oc2cnLKAcObj5bAft2omRqwjxOsKk0L02uQnt0Y6d1TOm9waQQxk X-Received: by 2002:a50:ed82:: with SMTP id h2mr24097069edr.206.1570358115977; Sun, 06 Oct 2019 03:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358115; cv=none; d=google.com; s=arc-20160816; b=LNSbfaNACz2LxLf0Hh3wHtdMMD8537Ey63Rnlm2AVgc3yKbGTH9w5PU9G7vLPqqB7L wVgJwldoVlWNa6h69PRTOXfvC/ANy7GLWjN71sbJ/MzLOo2pE+Obb2LmfeyXnr8pUDHb NwWg/xwtu/K0ReEUpdsB4J63dXLwPGYOWwqtmPWn5Kc0U3UQdHv8sfTp0rAeD2s/JMgb 2yyepEDSwgoKk8dZTqa4B5WWrBzS+UB1ohwmRq4lvLPYQvqYYGWMtjMO74Us0E/jTALX v2b0Uk23iYIVk/ZylLEsJSakjZmTVjbiyWm2EFtBeO3ZeBFw3zMjAQor0LKYtn4qpJuN D3Og== 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=/b4Z+KhHcki69fQ657KsFm431TISOEn6e0Pdu3fUErw=; b=MPtdRwJNRd1VgexH+fAqVLMmlrfC04DZNyt/4snbspcV8sbhg2PkvjkbcpdjVIeSn6 FUDhV8VkT/xY+NIRONU4HVy6Qyt/rrNcvzHzqfLtXb5lNjSOB2nWzcHRPDiYfgY3CeBl XLQgPAW8RyV2betdNnL9zvoho6yA/DSNrZP48XTD72FbiewyVg7vd+KrrzvXmlCz2vuY s0vVd0xKUm62i5u1YwwCHJHAleTOWkEQ/kOJhxngaPHvcBulxTuuu6V0smM/DF8exG1d kVkBAqlfT/oEJqSQIJd0UdXIQ0BILTY5OBKf1EVicaA+qQqdrTFFbWuG+JfurgKNuBvs QAow== 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 c9si6140990eds.211.2019.10.06.03.34.52; Sun, 06 Oct 2019 03:35:15 -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 S1727211AbfJFKd5 (ORCPT + 99 others); Sun, 6 Oct 2019 06:33:57 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44706 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726444AbfJFKdz (ORCPT ); Sun, 6 Oct 2019 06:33:55 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5C14DE105D84931F900F; Sun, 6 Oct 2019 18:33:54 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:33:44 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 29/34] rtc: sunxi: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:48 +0800 Message-ID: <20191006102953.57536-30-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-sunxi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c index 9b6f248..f5d7f44 100644 --- a/drivers/rtc/rtc-sunxi.c +++ b/drivers/rtc/rtc-sunxi.c @@ -422,7 +422,6 @@ MODULE_DEVICE_TABLE(of, sunxi_rtc_dt_ids); static int sunxi_rtc_probe(struct platform_device *pdev) { struct sunxi_rtc_dev *chip; - struct resource *res; int ret; chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); @@ -436,8 +435,7 @@ static int sunxi_rtc_probe(struct platform_device *pdev) if (IS_ERR(chip->rtc)) return PTR_ERR(chip->rtc); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - chip->base = devm_ioremap_resource(&pdev->dev, res); + chip->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(chip->base)) return PTR_ERR(chip->base); -- 2.7.4