Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3508980pxb; Tue, 7 Sep 2021 00:48:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFUPwF2KN3EP+R0nNe8thj8LxWpRPw89zkD6lmKzSIfWELMycIUpQv4z1CGl/aSUM5+xui X-Received: by 2002:aa7:d99a:: with SMTP id u26mr17383373eds.297.1631000920931; Tue, 07 Sep 2021 00:48:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631000920; cv=none; d=google.com; s=arc-20160816; b=cpQHXsHiY8n9uy2mmg9pUM8XUWh1AjE8ulL7LnZwCVjLpbspr4eAY7GYvGLXO2fcim aPNPh7i0e9t1Ozkjv0qHSCFoJ1wNfFhkIZExh1fCnplUanmWhdTSL0iiKL1lt8oDobfK dxeO0BHW8bHH6EhxwA/dkMO1TamDUav4SQ9D4DIM00hbSYN/DGQ+qsAjqHfptQwd6/v/ tYIJtddOYfnDJp5ZEv0JobeZwXWf1lpJ2KXNqLbjuBu1a2HMvQM+NcmNm91KVZ87hJMU T3S7Vd8GYonyfhEV06PUx4BoYL3UH1Tq4Y9foGGVVX8zuwdozdoxWmB46kbIGCbrUiqw zezA== 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=7ihOreXFDkaW+CvIv7wC/0Ye6nkWZRH8MPAq0ypsgpU=; b=LZfNZ5IY3CNuZ+6Jm3jFOQMcim7IApb0g8PrONyJ5KE2QePDAEKJ2OD7l+QSi3fHr4 8dYRA7H/r0RuZZP0uCWlawrw4xG44dhnCF+jJU6cMg7tkHkEs2gYeNNhg/9anOEiqP/q mEnTN2lGYw4YkRgCpITReyRARylStg3OYiJQGCPVmpLZh2ZFF1XXNsBefX2tDKayIlj2 lcgtvzb8H/+k5zTQx84dzdO942DxAo+gfHzzagZM0xQ9hdZ/XJ/aeIvX/sLORKj6uzy4 P+StEZbipONp3oPOGUMWrKfo+dgZT2fjKsF0QL5IFOjGEbHNq6qz8IJwATdg7Nv9OAdQ t3kA== 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 26si10284455ejn.309.2021.09.07.00.48.18; Tue, 07 Sep 2021 00:48:40 -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 S240006AbhIGHo1 (ORCPT + 99 others); Tue, 7 Sep 2021 03:44:27 -0400 Received: from mx20.baidu.com ([111.202.115.85]:45012 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S241825AbhIGHn3 (ORCPT ); Tue, 7 Sep 2021 03:43:29 -0400 Received: from BC-Mail-Ex25.internal.baidu.com (unknown [172.31.51.19]) by Forcepoint Email with ESMTPS id 1F77427EB0C373F503AD; Tue, 7 Sep 2021 15:42:22 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex25.internal.baidu.com (172.31.51.19) 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:21 +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:21 +0800 From: Cai Huoqing To: CC: Jassi Brar , Subject: [PATCH] mailbox: xgene-slimpro: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 15:42:15 +0800 Message-ID: <20210907074216.2655-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/mailbox/mailbox-xgene-slimpro.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c index 5b3a2dcd5955..946ea773ec33 100644 --- a/drivers/mailbox/mailbox-xgene-slimpro.c +++ b/drivers/mailbox/mailbox-xgene-slimpro.c @@ -170,7 +170,6 @@ static const struct mbox_chan_ops slimpro_mbox_ops = { static int slimpro_mbox_probe(struct platform_device *pdev) { struct slimpro_mbox *ctx; - struct resource *regs; void __iomem *mb_base; int rc; int i; @@ -181,8 +180,7 @@ static int slimpro_mbox_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ctx); - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mb_base = devm_ioremap_resource(&pdev->dev, regs); + mb_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mb_base)) return PTR_ERR(mb_base); -- 2.25.1