Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp725653pxj; Fri, 14 May 2021 14:16:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx8+B+jXJXax+nHK5f/QNAV0KTAbv0GOMzf6A/8i7UKrJ7IHF3hsJPmh2Gmiecj1gjV41y X-Received: by 2002:a02:a381:: with SMTP id y1mr44869363jak.1.1621026992891; Fri, 14 May 2021 14:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621026992; cv=none; d=google.com; s=arc-20160816; b=XzVkCDIQNg73Ei3GbS9IsgCvxLX6FfBtq9jv5+GCL4nTGiJmn7R5TvND/AmKjckHH4 YqlXLuPDufDwODtk9k+W69zzdfrxCoelvweUpYeQ5TOQc4G/1mN9jG1jNmYrgnjP9bUD Nnp5T6Cp29Iv6jwkAhjlDILkGMCnNOnbZXt/bLPjpzmoELP+HMyoF+w5UBIVP4arCEZx JuxpXXMNI06bMkG5chhuvhvNIuOYwKE7c+baB80PIGIGtMQ84fNVhThKqOsosJCVr8lk K1Epk02JUOVycR2mQD4VS8MI4kfWOteFCkozEeFLSlymE96slopcm3uXhO0uJR4blaX2 p1kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MoSSPkXKo4o6qIFWqVEQl4V2Nc01N2F0xON63x+w1u8=; b=BMLwn5DDe+Gs2xXyqQ149Osat/7J+wd1U/iNOKX5YE9zZGtGmU995HkXYyx3pCzGni Vi07O3w97M5eO11Q/E5g9+e0mIlQSiiTJTOs23hRklS5BjNrBZ/5i1kbz+rLXEVyPE44 v3lEZiUD71YC5WanaOr+9Bj8DC6Qm2GrcmOMErQjgCBVpMGo465IgJoVu3MCBbEwa0gu 78SZTnEr239H/z6W1zzuTgOD/jaadOgx+rHqAdu2sN+l8Q8rLjZrApt468GryKNpjM3B UFxPLvBkPGW/mY86kPkAqbbN39Elxkw+bJGQolq4UblbKM6njEmbHpaRRWVaCOnF5B8A vOOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=PFUngJNo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si8198790ila.81.2021.05.14.14.16.19; Fri, 14 May 2021 14:16:32 -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; dkim=pass header.i=@163.com header.s=s110527 header.b=PFUngJNo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233546AbhENMhq (ORCPT + 99 others); Fri, 14 May 2021 08:37:46 -0400 Received: from m12-18.163.com ([220.181.12.18]:42094 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232712AbhENMhn (ORCPT ); Fri, 14 May 2021 08:37:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=MoSSP kXKo4o6qIFWqVEQl4V2Nc01N2F0xON63x+w1u8=; b=PFUngJNoSIPqXYGmCc1q9 oDhWFnEU0ucPX/X0nldZFP8E1163/e1mGIG2dtlWEYI+9AXRUOD19FYF3w8YH6FS AA1dRzfw+o42zxEQspsOaOF+3pNc1eAmLFT27gaqNR7XrHOfyNpOKhBtzdPK0ASr HAkkx+u1k1+5rVQMCKEhZE= Received: from COOL-20201222LC.ccdomain.com (unknown [218.94.48.178]) by smtp14 (Coremail) with SMTP id EsCowACXkcHBbp5gGuSZjQ--.23353S2; Fri, 14 May 2021 20:36:18 +0800 (CST) From: dingsenjie@163.com To: mchehab@kernel.org, matthias.bgg@gmail.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Ding Senjie Subject: [PATCH] media: mtk-vpu: Use devm_platform_ioremap_resource_byname Date: Fri, 14 May 2021 20:35:21 +0800 Message-Id: <20210514123521.39296-1-dingsenjie@163.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EsCowACXkcHBbp5gGuSZjQ--.23353S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Wry3ZF13tw4fWryDGF4rZrb_yoW8GrWDpr yvkay7CryrGF4jqas8t3WUZFZ8AF4avayUC393Zw1fZ398XFWDZr18Ja48Zryak397Ja43 tF45CrW3AFZ5ZFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jbsqXUUUUU= X-Originating-IP: [218.94.48.178] X-CM-SenderInfo: 5glqw25hqmxvi6rwjhhfrp/1tbiTgKSyFUDJdSwjAAAsN Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ding Senjie Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Ding Senjie --- drivers/media/platform/mtk-vpu/mtk_vpu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform/mtk-vpu/mtk_vpu.c index 043894f..bfb9932 100644 --- a/drivers/media/platform/mtk-vpu/mtk_vpu.c +++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c @@ -821,13 +821,11 @@ static int mtk_vpu_probe(struct platform_device *pdev) return -ENOMEM; vpu->dev = &pdev->dev; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "tcm"); - vpu->reg.tcm = devm_ioremap_resource(dev, res); + vpu->reg.tcm = devm_platform_ioremap_resource_byname(pdev, "tcm"); if (IS_ERR((__force void *)vpu->reg.tcm)) return PTR_ERR((__force void *)vpu->reg.tcm); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_reg"); - vpu->reg.cfg = devm_ioremap_resource(dev, res); + vpu->reg.cfg = devm_platform_ioremap_resource_byname(pdev, "cfg_reg"); if (IS_ERR((__force void *)vpu->reg.cfg)) return PTR_ERR((__force void *)vpu->reg.cfg); -- 1.9.1