Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp389912pxb; Wed, 1 Sep 2021 00:55:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhaCEVQDUkXcLn9++LVwytZIIN8qNlRU+8LN96l5mGaBS269v0TDe49yHsZc+VG+Xa/7ou X-Received: by 2002:a5d:935a:: with SMTP id i26mr26192901ioo.79.1630482931773; Wed, 01 Sep 2021 00:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630482931; cv=none; d=google.com; s=arc-20160816; b=ui4kPlJDl8zrGm/6U01l2I6iiipEYGBnJhVKEq4GUQsxPjr7QmrQUHOfZ4mo/QyF2K PXOnxaqUHm/8soPboQdsWMkaXyT5sUzjQ/52KaD4BVEweA5jelS0USrj6pjwb45unFpu JyYvC/0G6fSwXviZfFlj2kBm3wPYLqKyGVpQCVGK80CAZHJBczzU5Wk/7ZmWAoOtB8RP Ec6tDE03UjiPrNDrZ9uWbBYLR8Nl774AiwI8VymdjzctsigFhHTkFQlzKnlnd1ZeqB1/ k6zd571MM30cFYaQUni5LLzY+U73xgsW/MNwM4hzp1fErJLLgoY5Ncq/t8I7wUsAaZiD 0oKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Xx86pN97kMtAWkcw0/SusOoJIl8xWRKhEOTJbhiBsmI=; b=PsO5ElSmA5Xy6WE7GlynAIDsTN8UZwwf7H96CYRYdCdFpSs2przWE0erA7l3lYRBHq YtPXtOVkURClUvJ6ztOoI2uGLmpXxuLHHdnM6hmIUmTPTufLwTM2RYRvZpUyGgpbCzVG gMunlLo1uVdeRVz+C8GaBOK8D1KN1HHL9L24b8f4USNmD3Y+XiHIPmJBizapSYsktbPf FWCldG009O6+XRO0tZLdJcaa/ipx5WUAb6KP6Y9ARI6VU3womlMAiq3Opw1JtT77m8PL LGfqQnAt1J3TID+E04tLoUEiyoPWm/S32nH0vLwttLY5+bOHQ1M4o+qFsoMWc0zJ6Ala 3VQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=TQ2qF4PP; 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=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n45si19297789jac.76.2021.09.01.00.55.20; Wed, 01 Sep 2021 00:55: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; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=TQ2qF4PP; 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=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242753AbhIAHyq (ORCPT + 99 others); Wed, 1 Sep 2021 03:54:46 -0400 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:41818 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbhIAHyq (ORCPT ); Wed, 1 Sep 2021 03:54:46 -0400 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 1817luOu002739; Wed, 1 Sep 2021 09:53:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=Xx86pN97kMtAWkcw0/SusOoJIl8xWRKhEOTJbhiBsmI=; b=TQ2qF4PPwKBDVP45Mnp7RPZ1DA6i4TERhPj6C2TGkr8/N3yRZX7MeR0WPaIdLMDk0NPH 2zBWyAhSYOdYFQnJs//ltzXtNFXMbCqHr68lirUPxESxduYtGNSHWpv0JkYmRMzJ35nT DwhEqVUNhZxMkhr14vrjo+v8knl99BR3QaMt2YVejF7xVkGSLSy9lo3rJoLeMeL0GMgl emUaGmLycAeApQep9CEEO7nCXJQw5M/8+rQbMOfnIosyIkFGM2ghAymjVzCKi7Cpev9k 3jTYHD64Q4jr+pIuPvkanZ2j5y/3sMPiPOR6qaZFAqm7jf9dfcUuI8b1A/G8UuTNPU+7 1A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3asxg027r7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Sep 2021 09:53:33 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A533C10002A; Wed, 1 Sep 2021 09:53:32 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 95BF52138DA; Wed, 1 Sep 2021 09:53:32 +0200 (CEST) Received: from lmecxl0573.lme.st.com (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Sep 2021 09:53:31 +0200 Subject: Re: [PATCH] media: sti/c8sectpfe: Make use of the helper function devm_platform_ioremap_resource_byname() To: Cai Huoqing CC: Mauro Carvalho Chehab , , , References: <20210901055631.7829-1-caihuoqing@baidu.com> From: Patrice CHOTARD Message-ID: <73002944-80b0-ba24-f490-0aaefd4ea08b@foss.st.com> Date: Wed, 1 Sep 2021 09:53:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210901055631.7829-1-caihuoqing@baidu.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-01_02,2021-08-31_01,2020-04-07_01 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Cai On 9/1/21 7:56 AM, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource_byname() helper instead of > calling platform_get_resource_byname() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing > --- > drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > index 02dc78bd7fab..9f05984f711a 100644 > --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > @@ -665,7 +665,6 @@ static int c8sectpfe_probe(struct platform_device *pdev) > struct device *dev = &pdev->dev; > struct device_node *child, *np = dev->of_node; > struct c8sectpfei *fei; > - struct resource *res; > int ret, index = 0; > struct channel_info *tsin; > > @@ -676,14 +675,11 @@ static int c8sectpfe_probe(struct platform_device *pdev) > > fei->dev = dev; > > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "c8sectpfe"); > - fei->io = devm_ioremap_resource(dev, res); > + fei->io = devm_platform_ioremap_resource_byname(pdev, "c8sectpfe"); > if (IS_ERR(fei->io)) > return PTR_ERR(fei->io); > > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, > - "c8sectpfe-ram"); > - fei->sram = devm_ioremap_resource(dev, res); > + fei->sram = devm_platform_ioremap_resource_byname(pdev, "c8sectpfe-ram"); > if (IS_ERR(fei->sram)) > return PTR_ERR(fei->sram); > > Reviewed-by: Patrice Chotard Thanks Patrice