Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp873948pxb; Wed, 1 Sep 2021 11:49:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpJKonhFG0qeEWlOKyld6lPTA1nHc0mVrZZx/uHqdAlZ3UA2CHacuJ215B08vzWie4Stjl X-Received: by 2002:a05:6638:2216:: with SMTP id l22mr889478jas.39.1630522192060; Wed, 01 Sep 2021 11:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522192; cv=none; d=google.com; s=arc-20160816; b=f3G6bnk9F0oWG3f+mzkpIElY0B/zE/eZOS7fvhCp7OzzjMXgzMW57qY7WtbwavfvSh 2CF/FMhIMhAEA+O9bIea+HgWtbM5gsJozE3mavgPreWVcIOsBbe05oFX5VDxcpsZs9vC 2MrePbTWfXCpTAOJGs1wILGdV9vCd0D6EPCIBtgoA0OYMsagl98PaRvnaOMsFw18H+PN 64IuKbjYXn9o7Mvg5WY0zbLC0RCio+xyUM9OtMw3fhN/cNt3uvhenOdFkTbnmYk/Jcfu PewTxQsVComA2hZv2EgsbXYZ53UI4rh7NMkJGak4uy5fsqngtyD74Rm+oB83npOg9Qiw tNkQ== 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:organization :from:references:cc:to:subject:dkim-signature; bh=rXb4cGIZn6Gdm/5BqKVC12dJx5JJGvLKFEx8SKKKyuQ=; b=Tk4B/HDz+aDKVro25QdxfBE5oweGHgeo4g7nwFIiqh7aUU1hK6ztk1npY/m7uglzSy swczcbqohMaWQauyi+EG5mWVuDYhGUdafW7ugL1iBM7mEUTWx6pVgvmReS6YfALR1DLf ntZtHmv9LA6yhJSHGc37sgKu3vjrynEqb/h/pOQQgVLfvjazH5qKJxDEiKDg07jN7Tjq 40/YJca1UeWJmA4TGWmUT/DchF9YSmHqrkVLRda1tdxTFstN95Bx3hgKOpESVmlD1kx8 lon+Rg5c7UaSDrxnQ3vfBGvGLdnltqGB9qhM9Ya63uDJfP3kyQSu/Q3wWlTGvJaXAaN0 FBNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=kZ5l50Zn; 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 u20si297523iot.57.2021.09.01.11.49.40; Wed, 01 Sep 2021 11:49:52 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=kZ5l50Zn; 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 S243061AbhIAIPp (ORCPT + 99 others); Wed, 1 Sep 2021 04:15:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243047AbhIAIPl (ORCPT ); Wed, 1 Sep 2021 04:15:41 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B6DEC061764 for ; Wed, 1 Sep 2021 01:14:45 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id o39-20020a05600c512700b002e74638b567so1299283wms.2 for ; Wed, 01 Sep 2021 01:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rXb4cGIZn6Gdm/5BqKVC12dJx5JJGvLKFEx8SKKKyuQ=; b=kZ5l50Zne0I2QYElYM2Ts4GrCDwGZLNXT/NczUEQ6qLa5fU537DXvqfzW0hrQ1OokU r9TQF/XmVD+akIjSJU9meYZedrhLpCNRtCup+/3UMiCf+dPll1pYcWpa+Yg2G5krWvfv 3Z+NbJk2WGyxUQauLD0oamStiP2Qy4itn/q8ZPUULWNcupbhQzxnzPIbgJOxhbF7VyYX rFZiq34NOLqqjw5DrS8mkF2j7/b/+Yp+D5koVuloGflrybGHyY+pAaqplx/7lORmT6Fe qwo1BTSpfq285lerc8si2xyOkj4IEfpt0o6SAsXVKKx1dy45bVQ+IMG2K/0tCC2qOh8v 7tsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=rXb4cGIZn6Gdm/5BqKVC12dJx5JJGvLKFEx8SKKKyuQ=; b=twLddaBEGJMEe+mGHPqmsHkMe7eWkTdIU52heZVt99jxeUKSzReWk3V10iAGORJ0wy B3Rg1a4t5lGHjWRP1zJisR33t7imaNxtjw0Qg8MIiInFGQRHb3SR4Xup81J249ghsTbB rLcdpunuf/Q7FnoeLiEIUPgOE3P6Ws23xdOj29s5cr+i2jN8UwzMJAfbXyLzbiPfA9aF KfcUKE3ym6c4w2Pgi9qjHIgosnM5xVrsL3jC6gvINO0TwMGa6BnsIAKmpjEoN7Vm2oyk S51oW1SkYiVIifvUfhvwPEGBj40dVSVxCmlQ6XZvkoRi7Lo/qlo2G5hkW3+oFCPpkbZW LQow== X-Gm-Message-State: AOAM5314km+gt6a52sglRWjAAzEn53cd5Y+lx/AKUvqQ9NDJi+BfjYOo oRyV99w7GVToCSBuF5HSFrx89qAxbGF9p6zv X-Received: by 2002:a1c:7f8e:: with SMTP id a136mr8504168wmd.34.1630484083419; Wed, 01 Sep 2021 01:14:43 -0700 (PDT) Received: from ?IPv6:2001:861:44c0:66c0:dc57:bccf:6106:11d1? ([2001:861:44c0:66c0:dc57:bccf:6106:11d1]) by smtp.gmail.com with ESMTPSA id l35sm2409757wms.40.2021.09.01.01.14.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 01:14:43 -0700 (PDT) Subject: Re: [PATCH] media: cec: ao-cec: Make use of the helper function devm_platform_ioremap_resource() To: Cai Huoqing Cc: Hans Verkuil , Mauro Carvalho Chehab , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210901054535.6215-1-caihuoqing@baidu.com> From: Neil Armstrong Organization: Baylibre Message-ID: <4b41b556-b2cd-5ffa-0462-5f41f2d33f85@baylibre.com> Date: Wed, 1 Sep 2021 10:14:42 +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: <20210901054535.6215-1-caihuoqing@baidu.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/09/2021 07:45, Cai Huoqing wrote: > 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/cec/platform/meson/ao-cec-g12a.c | 4 +--- > drivers/media/cec/platform/meson/ao-cec.c | 4 +--- > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/media/cec/platform/meson/ao-cec-g12a.c b/drivers/media/cec/platform/meson/ao-cec-g12a.c > index 891533060d49..68fe6d6a8178 100644 > --- a/drivers/media/cec/platform/meson/ao-cec-g12a.c > +++ b/drivers/media/cec/platform/meson/ao-cec-g12a.c > @@ -633,7 +633,6 @@ static int meson_ao_cec_g12a_probe(struct platform_device *pdev) > { > struct meson_ao_cec_g12a_device *ao_cec; > struct device *hdmi_dev; > - struct resource *res; > void __iomem *base; > int ret, irq; > > @@ -664,8 +663,7 @@ static int meson_ao_cec_g12a_probe(struct platform_device *pdev) > > ao_cec->adap->owner = THIS_MODULE; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - base = devm_ioremap_resource(&pdev->dev, res); > + base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(base)) { > ret = PTR_ERR(base); > goto out_probe_adapter; > diff --git a/drivers/media/cec/platform/meson/ao-cec.c b/drivers/media/cec/platform/meson/ao-cec.c > index 09aff82c3773..6b440f0635d9 100644 > --- a/drivers/media/cec/platform/meson/ao-cec.c > +++ b/drivers/media/cec/platform/meson/ao-cec.c > @@ -602,7 +602,6 @@ static int meson_ao_cec_probe(struct platform_device *pdev) > { > struct meson_ao_cec_device *ao_cec; > struct device *hdmi_dev; > - struct resource *res; > int ret, irq; > > hdmi_dev = cec_notifier_parse_hdmi_phandle(&pdev->dev); > @@ -626,8 +625,7 @@ static int meson_ao_cec_probe(struct platform_device *pdev) > > ao_cec->adap->owner = THIS_MODULE; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - ao_cec->base = devm_ioremap_resource(&pdev->dev, res); > + ao_cec->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(ao_cec->base)) { > ret = PTR_ERR(ao_cec->base); > goto out_probe_adapter; > Reviewed-by: Neil Armstrong