Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp888631pxb; Wed, 1 Sep 2021 12:07:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdLWnJK8+2zhftLfz8CmTiYpyCiboGWixYaCsCtZH0F0QxNPlDBynyTlgLtLxTfYWQEQje X-Received: by 2002:a5d:9247:: with SMTP id e7mr878219iol.161.1630523225060; Wed, 01 Sep 2021 12:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630523225; cv=none; d=google.com; s=arc-20160816; b=IYsH5x2boxvla/XlNWodaQRYU69FeqVRR6wT4dtAMyC0o/5RnqRkmjuBNK5bIBC/fN q6JHKnAuphzatKiGAGYdYFlP37fyIOKeylv9arP5KAiaLzx4hLOZnOL2IFrrAaSqVJbe jdYJzR8soNUTgU+2kUSdnLN6a+gdmYYjmAJr9ll8ieGvO0zIQ9KBOfFbO4L9hhj5KDMt hen2bto7F2O+OiWxm9rHWutHLJjzVERvch+PvP/PyKBHoKqQYUhfHka6H7GFqoUr/g6R O4X1aVZVy7uvPdlLEQEg38JmBURu9rxHoVEQ6Iuw+k1dDyzzniaV2bKqXWa5dylC7xSa HVCA== 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=MTZZMXjSb3GG22iTYop3KbIcD25Usf/lnlo1/y/4CBk=; b=N70XfmnimeMzHVhwvHjNNZ6r5DsNczcjJdNC0A6eL3yMXxfaH5HJWYamOrPTDK3yo9 nvGvF3fEUC157+KCbbJfQaBvISlu17RpMQR3IrrjUlGo2x1ZjWktTlmAGDT07527VtVe UFxaKeR12zEVuIQJmIcr38zlmLpYJvcG6E2+5w1l5S6+tLhAWwdFWNJwwyhpUszTWQrI jsZJULOKrxFJIkyTP/3ORXamsHXOODm41QQd8gkA3j+7KDWDoUfBaqWj65Uiy8XYbmUX JC30X7kzl4Jdsb0rMjsUe9OL8SlGJ5lMfkv/Bqnk4SgkZDWZth6cssLT1pK3QZhb4U6G xmLA== 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 f36si249480jaa.30.2021.09.01.12.06.53; Wed, 01 Sep 2021 12:07:05 -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 S242284AbhIAF4A (ORCPT + 99 others); Wed, 1 Sep 2021 01:56:00 -0400 Received: from mx20.baidu.com ([111.202.115.85]:51558 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242276AbhIAFzw (ORCPT ); Wed, 1 Sep 2021 01:55:52 -0400 Received: from BC-Mail-Ex26.internal.baidu.com (unknown [172.31.51.20]) by Forcepoint Email with ESMTPS id 741CA1A34A86FA8A283E; Wed, 1 Sep 2021 13:54:54 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex26.internal.baidu.com (172.31.51.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 1 Sep 2021 13:54:54 +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, 1 Sep 2021 13:54:53 +0800 From: Cai Huoqing To: CC: Sean Wang , Sean Young , "Mauro Carvalho Chehab" , Matthias Brugger , , , , Subject: [PATCH] media: rc: mtk-cir: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:54:47 +0800 Message-ID: <20210901055448.7129-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/media/rc/mtk-cir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c index 65a136c0fac2..840e7aec5c21 100644 --- a/drivers/media/rc/mtk-cir.c +++ b/drivers/media/rc/mtk-cir.c @@ -292,7 +292,6 @@ static int mtk_ir_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *dn = dev->of_node; - struct resource *res; struct mtk_ir *ir; u32 val; int ret = 0; @@ -320,8 +319,7 @@ static int mtk_ir_probe(struct platform_device *pdev) ir->bus = ir->clk; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ir->base = devm_ioremap_resource(dev, res); + ir->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ir->base)) return PTR_ERR(ir->base); -- 2.25.1