Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3507988pxb; Tue, 7 Sep 2021 00:47:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyanH1C3KPZb626I7qmg9MjEhKNknQ6afPnHM88CcyMfiaMsbKspO3aBR97J1UPqle/WUXk X-Received: by 2002:aa7:dc56:: with SMTP id g22mr16905242edu.187.1631000866519; Tue, 07 Sep 2021 00:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631000866; cv=none; d=google.com; s=arc-20160816; b=btoh9pczOjtmCvHHV9U7SE5VrGNypCIWKEEKap9FNI566kjzDdu4BFzpTcLHg4ipuW t4VKexS9OMniBaL2rQIZEWwG+THo6FPo210YbDdEfqLuY1T0va8mVWLALtKi0HDW2Rr/ r8Gv5IGvc/s1KwIeTqlJ8nRnKawdMG3n+zgI5dve7aXmlE/ndPuhUFtSFVxjjamfz4mR yZL6oKy40JKU9OO+ujGMJepckYSI5USrnx9oIwcml5dRfI4UrDzsqUnF84I7iNNNN5PP zmCjhjbPHqUFDtDDacAYqq5Ofu7Lq7cPo+h0bEzUSUZk6MxvibqU+9XTM8rceC9+9TaR z2mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=nA2nXgFwcQHpX0ImmD4dU1M87rWJL3Of/Ga97rKxPoU=; b=mIP+IK+S8Ul6A0nQe7uBgstJNCQdk8aZ6LXUHyFqnxQWaZQJnchoKq9autnkcUwXma B4PE2TLfk7RKKG6hW8TUCIb0SozLLZSocmRx/VeQyB2Rn8d4suwoqA3Iwnt6ANuoMG59 5d+WZzCufvApNXuinTRJQDJdPRSZOSofI6+3Qd4aU6TA61//zWuZFj3c+kPvipAMRQ11 2aDz6LtTGTqkcp6hAlPqCw13ujbEmc+Rq5CT8lGxHKZTYX3KSeq/AGj+QAE0vMBM/4tx NH/8k/SByv/+a+TdWU1T+slw37iC29FYEAtBVF92JWpdtRKrWU6CzyVhQIIk8evBYiF6 XRSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o14si8947801edr.253.2021.09.07.00.47.23; Tue, 07 Sep 2021 00:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242543AbhIGHoa (ORCPT + 99 others); Tue, 7 Sep 2021 03:44:30 -0400 Received: from mx20.baidu.com ([111.202.115.85]:45528 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S241132AbhIGHoA (ORCPT ); Tue, 7 Sep 2021 03:44:00 -0400 Received: from BC-Mail-Ex22.internal.baidu.com (unknown [172.31.51.16]) by Forcepoint Email with ESMTPS id 8D55F6478E73D627499E; Tue, 7 Sep 2021 15:42:43 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex22.internal.baidu.com (172.31.51.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 7 Sep 2021 15:42:43 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 7 Sep 2021 15:42:42 +0800 From: Cai Huoqing To: CC: Wim Van Sebroeck , Guenter Roeck , , Subject: [PATCH] watchdog: rti-wdt: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 15:42:36 +0800 Message-ID: <20210907074237.2808-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex09.internal.baidu.com (10.127.64.32) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/watchdog/rti_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c index 359302f71f7e..117bc2a8eb0a 100644 --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -194,7 +194,6 @@ static int rti_wdt_probe(struct platform_device *pdev) { int ret = 0; struct device *dev = &pdev->dev; - struct resource *wdt_mem; struct watchdog_device *wdd; struct rti_wdt_device *wdt; struct clk *clk; @@ -246,8 +245,7 @@ static int rti_wdt_probe(struct platform_device *pdev) watchdog_set_nowayout(wdd, 1); watchdog_set_restart_priority(wdd, 128); - wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - wdt->base = devm_ioremap_resource(dev, wdt_mem); + wdt->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(wdt->base)) { ret = PTR_ERR(wdt->base); goto err_iomap; -- 2.25.1