Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1026401pxk; Fri, 18 Sep 2020 01:38:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxvdu2gLLctCbldQ7SB8J6hhHU3v7HtvkSxZuSeSwvE/86Rc2ttNYb1RaA+4QeIKnkmEeC X-Received: by 2002:a17:906:1e51:: with SMTP id i17mr36120130ejj.103.1600418325794; Fri, 18 Sep 2020 01:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600418325; cv=none; d=google.com; s=arc-20160816; b=08/WXFDmraAx1ZMnFG67YpByW8R99ND62/x3L+03GfXNNtjexw6vZ525FruOhfxU2b xI6dbTM6/Y/FFK1W41MaFWilm95tYyQOrbUeyV0w88Q3BSaOty/psMIOMeYLaU23hpPA PiCHullP5gg/S5dmwP/b/lTRSu8SnG33r9RRkXEU3Eb6qc49GLc55Zg3FHIrLxHpM0QW BIj9GlaFqhPQmoHY6jRItDX5GcZSbD73eExhm6cuYIgoEbqwKkiVB3IWjUXKT2lJY6P2 OwGSde4x0BRItTzmewF1OETZZVE+l6GzQeh8mm6ouEAdiduNexG5+t/Av2IK2Y/2J2lM grxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:mime-version:message-id:date:subject:cc:from; bh=hQnHG6y00NaQdM1ek2tLsOHTmUf5ZTGDBJPfOVHUX0k=; b=mj0KVh0XXgV9SDYzHt2NAxkmRCNboD/n3iJeTnCJ8864xTQUoABZqDswl5ohI00G/6 gC4lw+ExfgnJ0SGjJuTTZ+5XoM9RgavllonLYEwwYdBVpCfQRxAT1qxQVwrjV8FxYKTM sRdf7ezqM42mY2TxUORQ8/NiMAoyylPmkdab0yfBCOcSyUw2BwGw/qS+2T95yEv1PCCf pZrMsKqcQOrJYdWIkbdJcxxZjh+Tmug0yntbOg0uZ7q0CIf7wbBEYAaIah6NZnEVb23Y QTpxhExIAkKty+niUrpbx7q4aRYV/v6kw2NkW88G+TnviGXNbEg+/BS0DOXMHe9mvydt odSA== 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 dk17si1754405ejb.71.2020.09.18.01.38.22; Fri, 18 Sep 2020 01:38:45 -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 S1726426AbgIRIhR (ORCPT + 99 others); Fri, 18 Sep 2020 04:37:17 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:38586 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726109AbgIRIhR (ORCPT ); Fri, 18 Sep 2020 04:37:17 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9FD9A22B9889A31E4CBB; Fri, 18 Sep 2020 16:37:14 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Fri, 18 Sep 2020 16:37:07 +0800 From: Wang ShaoBo CC: , , , , Subject: [PATCH -next] misc: pvpanic: Use devm_platform_ioremap_resource() Date: Fri, 18 Sep 2020 16:36:34 +0800 Message-ID: <20200918083634.33124-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make use of devm_platform_ioremap_resource() provided by driver core platform instead of duplicated analogue. Signed-off-by: Wang ShaoBo --- drivers/misc/pvpanic.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c index a6e1a8983e1f..e16a5e51006e 100644 --- a/drivers/misc/pvpanic.c +++ b/drivers/misc/pvpanic.c @@ -143,13 +143,7 @@ static void pvpanic_unregister_acpi_driver(void) {} static int pvpanic_mmio_probe(struct platform_device *pdev) { - struct resource *mem; - - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!mem) - return -EINVAL; - - base = devm_ioremap_resource(&pdev->dev, mem); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.17.1