Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp266223pxb; Wed, 8 Sep 2021 00:13:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC3kuBSrI/ma42E899wLRAevBqvXtHye/bgtzVt/Lae4YvE6827qpo6Pn8tv3bigGWuyep X-Received: by 2002:a5d:9304:: with SMTP id l4mr2080047ion.167.1631085234926; Wed, 08 Sep 2021 00:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631085234; cv=none; d=google.com; s=arc-20160816; b=02J1Zx5ZOx/L5ti0eAOEkaV5mTqwrgMhGoKZ1//KSV2oXOoh+Ogpeb8lu/APjuJTX5 lKAuipaB65u1KelYDMDayfXVFwu4iKfi7FzHXX6RhbDa03EknXkW+uwd/pXW7jITwc2y yeioBzfESaeYRmQqCkVOe08CmDqMioJ/4Siuww4GlHvXc/aWQj6ewl0vxpWGgsrbXWnL vin32iduVbY0l5bNoUnI5op4KB3Pppiq9lQOHb/mfpzcE2LRP4pbHx0mgwTrw/RfnX83 Qj5eYsqQ6HXqt9gcwvViBu6417zrU2grPFLjPEgrH8uFTMtFpUfTmEip1Eo+5DmQFamt toog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=6mon8QQ8HqB81EREOaFPNs9xtAR7Mk4wq4X9VMqZ8IA=; b=TPbx+62K0iCL0NsrTj6iS6qz8HEVq0b69kBzHIKy3WTXV0PIR5Kc+YU07B5swbY4m5 kQtx2IYVu0ttYTmsKfs89NC/xfoupeD/ADNbe7tUH6kOrKBZ09KCxLH7sj5eUcB9qbuO uF6axjOQWeHQLWn3cOlzsz8GbCNrOHuOGZsPbWjgOV1AQDJ+7BYb2ZovRlepAlNxfSgX 3S42e9XOEC7HpSnBiX7Nw6nnXYsK6fxONjQR7Eoa/3ekCTsjchRSjXrn+tGSPzEG8/79 Qt5Qh1nuSoayfNGdY3TuKRJ2fvw9sG4ePgKsDDLVZqT77ay8AUUx5Yv06YJmoHOS7jvN P+8g== 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 c18si1343400ioz.59.2021.09.08.00.13.36; Wed, 08 Sep 2021 00:13:54 -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 S1348794AbhIHHMw (ORCPT + 99 others); Wed, 8 Sep 2021 03:12:52 -0400 Received: from mx21.baidu.com ([220.181.3.85]:57968 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1348733AbhIHHMv (ORCPT ); Wed, 8 Sep 2021 03:12:51 -0400 Received: from BC-Mail-Ex29.internal.baidu.com (unknown [172.31.51.23]) by Forcepoint Email with ESMTPS id 742E91BCB78B461E2E17; Wed, 8 Sep 2021 15:11:41 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex29.internal.baidu.com (172.31.51.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 8 Sep 2021 15:11:41 +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; Wed, 8 Sep 2021 15:11:40 +0800 From: Cai Huoqing To: CC: Neil Armstrong , Kevin Hilman , Jerome Brunet , "Martin Blumenstingl" , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Florian Fainelli , , Li Yang , Krzysztof Halasa , Matthias Brugger , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Thierry Reding , Jonathan Hunter , "Santosh Shilimkar" , Nishanth Menon , , , , , , , , , Subject: [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 15:11:14 +0800 Message-ID: <20210908071123.348-4-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908071123.348-1-caihuoqing@baidu.com> References: <20210908071123.348-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) 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/soc/ixp4xx/ixp4xx-qmgr.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c index 9154c7029b05..72b5a10e3104 100644 --- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c +++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c @@ -377,13 +377,9 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev) int i, err; irq_handler_t handler1, handler2; struct device *dev = &pdev->dev; - struct resource *res; int irq1, irq2; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - qmgr_regs = devm_ioremap_resource(dev, res); + qmgr_regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(qmgr_regs)) return PTR_ERR(qmgr_regs); -- 2.25.1