Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp344090pxb; Wed, 8 Sep 2021 02:31:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuiiLBAOL/1xxZLNoIHAPFBj/+lwQXeKeVx378Qsyg1Ax9y2XzJKvuyMAv8BCp9Vzmw5lV X-Received: by 2002:a05:6638:d85:: with SMTP id l5mr2789720jaj.2.1631093504856; Wed, 08 Sep 2021 02:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631093504; cv=none; d=google.com; s=arc-20160816; b=DCLzkqSobj3sBDVynXE5bpgdUK+cPksWs5SruSosPf5T1IOzdOL3rg49YftdaNQo8P Dn3JtB8O8/JiL3AkcxrqDiM7Ly+AEdCq8fODQslxCIMyCYuj9faqNijJzV88Hpiyz+mg LbS6+HLe1BsOJ4+/gM5aUXLIJEdRSTEmprdi5X9zHjUM9a9Pmr66APcJobPoqc1eeRG3 FxKLoZC7i9Aaq/y429tX65ZG/ssdv+pL8wIfrU0i8HtEGzkCNWSCaMzFoKG+8pS+mNRB SXQtYCjszQC3/jLDB9sW4RDQXfLMk3qDQqkBrSaPLsStnHj+t6sqtVdNakCFdY1gfhTN /D6Q== 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=6mon8QQ8HqB81EREOaFPNs9xtAR7Mk4wq4X9VMqZ8IA=; b=a1SwIiZhJuone0sC5gwk4ROD4uerjfsmKksjlmpgnYpeDwhjRpoHPEwiVNKxk7K2TA HBgcvN6yOY72zQbBS2tWKYf8VXz6yFamcpw5Jg8mVC4x0VGw2K0KitnPG1bwtMBbWX5Q g4e1rQwCjYFrnYZYnauAsgRfqRXQZrBLeo3RDM7T5S5dzB/aDSaU/ZXuvxvPRj5afJkX b5N49006THf6kmqN9x5iZ3NYY46405Epy1fncpiakyEFJoUh56YOtNvofxZecNN0wmg4 R99l8kF+7EsAHWew9ei/4m+JpFTD8cSv3vSchQ+ELKoW1JAONke6uCa7xzfS7ErNMcHu rsPQ== 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 h26si1568994ioz.60.2021.09.08.02.31.34; Wed, 08 Sep 2021 02:31:44 -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 S1348733AbhIHHSW (ORCPT + 99 others); Wed, 8 Sep 2021 03:18:22 -0400 Received: from mx20.baidu.com ([111.202.115.85]:36208 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1349259AbhIHHSV (ORCPT ); Wed, 8 Sep 2021 03:18:21 -0400 Received: from BJHW-Mail-Ex14.internal.baidu.com (unknown [10.127.64.37]) by Forcepoint Email with ESMTPS id B94042C49EB059C96719; Wed, 8 Sep 2021 15:17:12 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex14.internal.baidu.com (10.127.64.37) 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:17:12 +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:17:12 +0800 From: Cai Huoqing To: CC: Krzysztof Halasa , Subject: [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 15:17:05 +0800 Message-ID: <20210908071706.721-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-Ex11.internal.baidu.com (10.127.64.34) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex14_2021-09-08 15:17:12:718 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