Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp485694pxb; Wed, 8 Sep 2021 05:53:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0nsUqjgI4T5CL7MF3/JD8T95kIMyslOg3lKA++i2WWH6kt5dFGgZBhVRkFFtQOR2Qz0LM X-Received: by 2002:a92:1a08:: with SMTP id a8mr698959ila.268.1631105611244; Wed, 08 Sep 2021 05:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631105611; cv=none; d=google.com; s=arc-20160816; b=S1w1KQfzlzyg1VbnCjZ9GWsPyMxuU11zA2tqTbtvrKeD3W/4G88ItAGkyACjMUyLLu L1EA2pO5SmEg28hzWSSEtwT8b3ovHHfjUhK4z2ePyPMBLc6q3W2h7PRZnZa/bKt71ImP CUz3J9zKtsI21wNteCudlqIBlUYpFfMO+mPs2dmzGXUuNPzt3desw+Iugoc0dRWYAhvE MHI1VHI59yL5/THH0EpsIsraZC6dut8NsZeRgdcLh7hGipzwONSqVwsDN2J+QLgVDAUH oTVb2+ARbZ/hszLUH8mZoBfrOBuVRgNPmnKD5gFJC+Qd1IUhArZ5tb3VyvED3GuEtd/o L7Hw== 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=ZCuD5uYZJ070d6hJMvN5fYKgvrHBxg5dhGKtdpNHoXM=; b=KPoxHVIcQxfQYAVukYmEt1eJzJbUaOJ+cMihKYuqyxhaDLLa5gA6o3tHJVg1JG1X5V JZDVleMXH+vs0k1DOWmyrVsTc0JM+VGPPXXcPnvH2K4+R/hX0/voagf04zxSLsh1hB2E 2MxbuvRP4eWTO13BcAsbBDqqxz/lj0fAhh/ZVm5iYzCs1cu1OBj6rPMuQPF31x/nJM8d RgVG58KYqT5+LutGrS8Suh5t20ya/ZkoPJpF7GMJ0KzH2/dbBjNelQAFc0GcX3LTtdVz lNMMjcAIkeSYe210HpSWNEYvIeijD0npA5elSoim2EGjN1S/AGaOWndtG+qdSPCP6Lqj EDdw== 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 e3si1927143ili.28.2021.09.08.05.53.14; Wed, 08 Sep 2021 05:53:31 -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 S1349189AbhIHK72 (ORCPT + 99 others); Wed, 8 Sep 2021 06:59:28 -0400 Received: from mx20.baidu.com ([111.202.115.85]:41852 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1351535AbhIHK7R (ORCPT ); Wed, 8 Sep 2021 06:59:17 -0400 Received: from Bc-Mail-Ex13.internal.baidu.com (unknown [172.31.51.53]) by Forcepoint Email with ESMTPS id A145D64496600D136CD7; Wed, 8 Sep 2021 18:58:08 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by Bc-Mail-Ex13.internal.baidu.com (172.31.51.53) 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 18:58:08 +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 18:58:07 +0800 From: Cai Huoqing To: CC: Ezequiel Garcia , Mauro Carvalho Chehab , Greg Kroah-Hartman , , , , Subject: [PATCH] staging: media: rkvdec: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 18:57:59 +0800 Message-ID: <20210908105801.2086-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-Ex15.internal.baidu.com (10.127.64.38) 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/staging/media/rkvdec/rkvdec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 7131156c1f2c..bf00fe6534a3 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -967,7 +967,6 @@ static const char * const rkvdec_clk_names[] = { static int rkvdec_probe(struct platform_device *pdev) { struct rkvdec_dev *rkvdec; - struct resource *res; unsigned int i; int ret, irq; @@ -999,8 +998,7 @@ static int rkvdec_probe(struct platform_device *pdev) */ clk_set_rate(rkvdec->clocks[0].clk, 500 * 1000 * 1000); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rkvdec->regs = devm_ioremap_resource(&pdev->dev, res); + rkvdec->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rkvdec->regs)) return PTR_ERR(rkvdec->regs); -- 2.25.1