Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp343675pxb; Wed, 8 Sep 2021 02:31:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn1wpEanoxAgLr5XkYFVx2pkurblJYvw/uO6HDIl3VN625MOEzJ8zEKLksE1Ogfg+MLOuS X-Received: by 2002:aa7:cb8a:: with SMTP id r10mr2788927edt.237.1631093470915; Wed, 08 Sep 2021 02:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631093470; cv=none; d=google.com; s=arc-20160816; b=y60LPLNTGvrp974JJiohhS4AMA2PvkrIHz9UcVXRjCktnsg9KMrnD8L0cAxNT6nz9j +kV3Apl2dKuc1adIrNjK4jUF5eSmvlNMkeydFfwaAgtu2jcU9ppUAgN1NQmUKFoMoa6Q DxmMPbra3fMRwgxX3qajEtwe0F6cdBRcUfaHmAMlH3OyBjErmnypfjpROJsicubMyeZ3 vsDFkwKMDe8A4MKcyONidrNGCNZh+83fzZLphRdVT174EO6WwGK+iBIU22MAGy1fWPoK MygUi4usHaV3LwFLCWhnAtTyVkTkZqP2nns4lVUik2UHkeucJkxR3Eh6oHqIT/OmL8vW SHEw== 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=+NUEzZobnNMvnocoEEdBoKiGqeL/HqDPuxYkBtyUvpQ=; b=GciYkN7mW21TbW3sG7r4P5kd+4Vj6RwMWHXl5Kos47jT8DhR/bIUKXNu7Lq7tcC99n NtThk0/v3n4fXHmQAk8Nn6VBxdcs+UuuXeJmSmJllfdu5YqEJvR/vRlHwd4DcOOshgOx x1ScY6z67AQqoolt6L4JyEhCs9HetLH69gL1LSmbF7WkqLJbT4MPikxDCoA64GxevNPV u59mDrVrjWVR7IrSouh8LFzBaMW37s6BqFRD3wQwQQXkyok5WS8fmXiIu8MNh3GnCLlk 8MKHkkAxrI6jJmRundhIXGnIPM/MDIqvIXTc6qZ0qBPhh6Cxc5+vqJdBU3On7xd9lGF/ d+VQ== 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 jg36si1804985ejc.753.2021.09.08.02.30.46; Wed, 08 Sep 2021 02:31:10 -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 S1348185AbhIHHMQ (ORCPT + 99 others); Wed, 8 Sep 2021 03:12:16 -0400 Received: from mx20.baidu.com ([111.202.115.85]:56986 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235984AbhIHHMO (ORCPT ); Wed, 8 Sep 2021 03:12:14 -0400 Received: from BC-Mail-EX04.internal.baidu.com (unknown [172.31.51.44]) by Forcepoint Email with ESMTPS id 12632394B92C5783F706; Wed, 8 Sep 2021 15:11:06 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX04.internal.baidu.com (172.31.51.44) 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:05 +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:05 +0800 From: Cai Huoqing To: CC: Matthias Brugger , , , Subject: [PATCH 2/3] soc: mtk-mutex: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 15:10:57 +0800 Message-ID: <20210908071059.291-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) 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/mediatek/mtk-mutex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c index 2e4bcc300576..065ec1c47e0b 100644 --- a/drivers/soc/mediatek/mtk-mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -458,7 +458,6 @@ static int mtk_mutex_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_mutex_ctx *mtx; - struct resource *regs; int i; mtx = devm_kzalloc(dev, sizeof(*mtx), GFP_KERNEL); @@ -479,8 +478,7 @@ static int mtk_mutex_probe(struct platform_device *pdev) } } - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mtx->regs = devm_ioremap_resource(dev, regs); + mtx->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mtx->regs)) { dev_err(dev, "Failed to map mutex registers\n"); return PTR_ERR(mtx->regs); -- 2.25.1