Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3042416ybp; Sun, 6 Oct 2019 03:32:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfN/8JKhPMxXcqnSoppnL0NghTBeODeJpmlWelPz82/pAsGRJYyidoxN3hT/QfEaZMUkOr X-Received: by 2002:a50:e691:: with SMTP id z17mr24000055edm.84.1570357970863; Sun, 06 Oct 2019 03:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570357970; cv=none; d=google.com; s=arc-20160816; b=jqbnR6hBGJB/SwUc+TnQ3NQXMqOaHP+qJizQnnnp9qBbHuqU2Z9Rf+8XWgolpdwThk tCY3cMEnBRNjaBE5tnD/NBqHCgR1Lf7A7228I430mEO1+cB7NAYEe3Ik8/fqkfO92Y3i +0/jkALR6j77Xr2SkpaT2yybL2hiBFP+wqcAWS6Xn4ohllhuF5ijlBBodNAfmzlexe3W yeiuqacwDM5va6RttLjxmngl0GTrZuvbfb6gE3GgO5oOPtuGJhKVSgqo16hTdKV4Gz+J ctkcYjG9RzOGCT75wPitnyxCGrKuC8fY2HjhrU14ciQKZQK6V70+lj92CBxDmCt42xk1 wiqA== 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=krUT69AdNZD+2cnItwA7uoZXMx+LOg3Ou5VAXiEkKes=; b=VgFdzK8H40x/+IrDr/pGcCZTJiAhsige6JsToGjNBvmLzQQOKxNIpAkiy/Lw6nbw+M CLCQ1CtZGlZnmjCoIENtH9km2qSDPxgLJU92e5W6nzAOoZZvvLfTch1HCat79FUDGFA5 /5HWKz7TX/uqXMV1SjpJh41ds/OTeMnLjxTGlySY/icn1YJqNten8Cm5SQymef+uPrXD ZJDAtuGRlgzs1vaHrlqUIxhMscheYzXED4OkIfKv4ia27YAAdE8iCREtWd05Ez6y+4Ye ANNHRo0Pp6JJsG9A3oGOTbHsr0LXlXn1YJrtZlEXsPgG8p6RzSr6Q80xk1idsj9zOsFy 5gJw== 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 d9si6712118edb.371.2019.10.06.03.32.27; Sun, 06 Oct 2019 03:32:50 -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 S1726578AbfJFKcQ (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:16 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:42792 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726293AbfJFKcP (ORCPT ); Sun, 6 Oct 2019 06:32:15 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 80E9C68B6D1A82F02FA8; Sun, 6 Oct 2019 18:32:13 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:32:05 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 02/34] rtc: rtc-aspeed: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:21 +0800 Message-ID: <20191006102953.57536-3-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-aspeed.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-aspeed.c b/drivers/rtc/rtc-aspeed.c index e351d35..eacdd06 100644 --- a/drivers/rtc/rtc-aspeed.c +++ b/drivers/rtc/rtc-aspeed.c @@ -85,14 +85,12 @@ static const struct rtc_class_ops aspeed_rtc_ops = { static int aspeed_rtc_probe(struct platform_device *pdev) { struct aspeed_rtc *rtc; - struct resource *res; rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); if (!rtc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rtc->base = devm_ioremap_resource(&pdev->dev, res); + rtc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rtc->base)) return PTR_ERR(rtc->base); -- 2.7.4