Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp338720pxb; Tue, 31 Aug 2021 23:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznsHJui92TBGJKU25H9KwtRuvq2CkkNA/XNfTeZjECDwkZEZkeKmBzArSdPyc4rjCPdX3q X-Received: by 2002:a5d:87d2:: with SMTP id q18mr26227656ios.78.1630477602334; Tue, 31 Aug 2021 23:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630477602; cv=none; d=google.com; s=arc-20160816; b=XOUx/YMk5MSSaY8TQ9WCLYmXALBzNbOFLmIP3PyIyEoXSEYz6vkzG7pwuSs83O+9jB vpMVNgRf6DxTOuKyW0aN2A+tJVx+arv3wEtM/MmokP4go2+DTOCf0+ycxZd3+pMgnYoU 1tNC5/tPdFdwN/KV3Bz3OWve27ZjsoV9FmCKa2/jYH3qSIhmU4wqOhBcUzsna3Gg7MGB 6RNru+Sr5mniaqXqbKrY/tpGhDHsMN15eC9gNxqMR1AdzNTFvQxdY1r3hmrAIWs6vRgQ ucKK+UC6nBfErf0XUB+BfkFeIR612yiyJUpEdpwn4twwwa3Ob6r5BIZXc+cbsDyrI+Ld N2ug== 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=ksaEnksKHBV8VJNS+4NAtbAJoj4aFxbliAm6XF0c3nQ=; b=VKLsuxzfrlT3NrV7yCiJEpuzyk4alyiptAKIZGddGh+HUYoErYk5tUb4yqh/s2/z+q 1JeiuyD0I6B0v4QkCHa8ktlo3bUVtum/Eub5YUU2kSAPWKiALqKISbf55U/rFbv8uCr4 4rPsteQDVtZ24LSnez4bu1yHU6jobKo4y1ekQPT0saMA9b5vvrYE8jXOeNxDSNYxIXIP Bn0RSfB6SNA3RdIo/jTK7n951d7S4ULlK7VQql3/x5X7EfseZ9C2JxUSdS8RPHSX+r80 HHoepQ3bby7PX+B+wd7htw0+sFXRMyUW8ZEK4rK1XbubP3ilxxQuCEkVDw4jqOezOzA/ J0jA== 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 p20si18276036iog.74.2021.08.31.23.26.30; Tue, 31 Aug 2021 23:26:42 -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 S242272AbhIAF4E (ORCPT + 99 others); Wed, 1 Sep 2021 01:56:04 -0400 Received: from mx20.baidu.com ([111.202.115.85]:51766 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242285AbhIAFz7 (ORCPT ); Wed, 1 Sep 2021 01:55:59 -0400 Received: from BC-Mail-Ex24.internal.baidu.com (unknown [172.31.51.18]) by Forcepoint Email with ESMTPS id 0FEC1638195BA0C7D9E8; Wed, 1 Sep 2021 13:55:02 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex24.internal.baidu.com (172.31.51.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 1 Sep 2021 13:55:01 +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:55:01 +0800 From: Cai Huoqing To: CC: Patrice Chotard , Sean Young , Mauro Carvalho Chehab , , , Subject: [PATCH] media: rc: st_rc: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:54:54 +0800 Message-ID: <20210901055455.7179-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/st_rc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index d79d1e3996b2..4e419dbbacd3 100644 --- a/drivers/media/rc/st_rc.c +++ b/drivers/media/rc/st_rc.c @@ -231,7 +231,6 @@ static int st_rc_probe(struct platform_device *pdev) int ret = -EINVAL; struct rc_dev *rdev; struct device *dev = &pdev->dev; - struct resource *res; struct st_rc_device *rc_dev; struct device_node *np = pdev->dev.of_node; const char *rx_mode; @@ -274,9 +273,7 @@ static int st_rc_probe(struct platform_device *pdev) goto err; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - rc_dev->base = devm_ioremap_resource(dev, res); + rc_dev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rc_dev->base)) { ret = PTR_ERR(rc_dev->base); goto err; -- 2.25.1