Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3518219pxb; Tue, 7 Sep 2021 01:05:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP61oUv39OCs+uqqwdYeqKCDe571ScGBi8LHPIIYrPQ+twaRBkz97yDgv021mG2jnBkSRT X-Received: by 2002:a17:906:1146:: with SMTP id i6mr17659398eja.12.1631001903204; Tue, 07 Sep 2021 01:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631001903; cv=none; d=google.com; s=arc-20160816; b=Bk4VmOySSeniHOyy2gJhpwczGIDb3RLFks/22UrTDT6oFnN8fJrTpN7iprCUGanl8M 0breEvsXz6tYV6G6I7KE71ZDBqFQzzUYHQ8ucQ8Q99SZXG1r0d88IIrVHEOvqQ4sQ8a2 V9cfREqi+2bJxhpAyPg/pXSb1a6KQD4/rSBBs9u0RA8LWQ00+7qwpHF6CnOp9jpudcVQ 8rWeNucNhaAYB/SXrImNVK1qBi6f4VD37/gNARTRBSG5Rg09+rX5PsJZXDGSt/t717tj U4ZbPFUC5l7vULnmJtyg2LnvDLW1BmiQ595EQoQo5oIaGuwuGki/6B3+6gsfEK2aRfYU huTw== 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=0wZfS71edaDTDShOl1ZA18uteKs9YWAN71tBn4pnd3c=; b=Hmz6NG5ewgQFwY1YKb/48z8zMgh6o7OQ+3H96A8iR+NGmAaJyt7xj+dwEjvCMUXuo5 7QCheavwZxrtm4UhLVUCEA0D4SGFdFG33maojIvXsyg/qAKOaJHNZo4537NGICnwbi/L uspHUWumtGLWjusWCc3u7jZ/u2Ti6FIId3KylTKS32+RiXk+7lQQYJMdEfCcYfbpyGY2 wG+kSwTBV2PZD78QyxEGneO0lb0GMrI5Wty57qg0002ZXtWRcgE+TUr4RdIR7Z5CY+p6 YLw4pkzhu/R/zP/Fq144Bx7UHc4Tnhd8vzRr6Zck63NoEXYN9pnTgSQVLoXpj1FT7niV FcrA== 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 i5si9931114ejd.224.2021.09.07.01.04.40; Tue, 07 Sep 2021 01:05:03 -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 S242915AbhIGHoP (ORCPT + 99 others); Tue, 7 Sep 2021 03:44:15 -0400 Received: from mx20.baidu.com ([111.202.115.85]:45210 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S241955AbhIGHnp (ORCPT ); Tue, 7 Sep 2021 03:43:45 -0400 Received: from BC-Mail-Ex23.internal.baidu.com (unknown [172.31.51.17]) by Forcepoint Email with ESMTPS id 5A432D70E7AF7E549FC2; Tue, 7 Sep 2021 15:42:36 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex23.internal.baidu.com (172.31.51.17) 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:36 +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:35 +0800 From: Cai Huoqing To: CC: Wim Van Sebroeck , Guenter Roeck , , Subject: [PATCH] watchdog: iTCO_wdt: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 15:42:29 +0800 Message-ID: <20210907074230.2757-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/iTCO_wdt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 643c6c2d0b72..ebf7e5bc1199 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c @@ -96,7 +96,6 @@ struct iTCO_wdt_private { * NO_REBOOT flag is Memory-Mapped GCS register bit 5 (TCO version 2), * or memory-mapped PMC register bit 4 (TCO version 3). */ - struct resource *gcs_pmc_res; unsigned long __iomem *gcs_pmc; /* the lock for io operations */ spinlock_t io_lock; @@ -503,10 +502,7 @@ static int iTCO_wdt_probe(struct platform_device *pdev) */ if (p->iTCO_version >= 2 && p->iTCO_version < 6 && !pdata->no_reboot_use_pmc) { - p->gcs_pmc_res = platform_get_resource(pdev, - IORESOURCE_MEM, - ICH_RES_MEM_GCS_PMC); - p->gcs_pmc = devm_ioremap_resource(dev, p->gcs_pmc_res); + p->gcs_pmc = devm_platform_ioremap_resource(pdev, ICH_RES_MEM_GCS_PMC); if (IS_ERR(p->gcs_pmc)) return PTR_ERR(p->gcs_pmc); } -- 2.25.1