Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp867794pxb; Wed, 1 Sep 2021 11:40:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycQWXAD48Yi2/CVBQUhVT0Cw+ALFo4IQvgaU+be2kBer4qyXulUKPt0EF7/2hAi6FxohGs X-Received: by 2002:a05:6638:2509:: with SMTP id v9mr852816jat.95.1630521645743; Wed, 01 Sep 2021 11:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630521645; cv=none; d=google.com; s=arc-20160816; b=wsC11oS7Udl0WrWvHH/fT1fgdBHt75nTwJcO7B0R2fejbIj0acGq8v6d783pOQ+UWN QHRaDBjly1/VwN6eesal8hps0qHI5lv/5khsVdtjIt6icsLMN1Q52PFSlf7PfaSzDUqQ i1D7M0CfWgyTKB58ki+DJ9AvAly5w2CIXdHMxiyS0/S5urW6uQy9nNgBlPkYmjITO8AJ qbklE98LIMh0dfNaYolEBt16fWqKLbNHl79Wq9hlBHQMT+Zr5Hm5cfm2N5pY+NUTxCWB o6CQbDXR6DWKmVIxzFN6Q08EILs+0s6D2Aa4C5ZsGp/xFPmBK9Bb0AMH/Eyl8Gh0sbWz S5Ug== 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=DopuyJrYd2eWR4CxmYjveA7l3sy6ZCoYqO7/ZZkbC+s=; b=Wc/sfuqXrJ7SgGO4zL93eS4CDtwCmTMsOlM8ELXlTnh5Ld4h7g5wtC0i8EzoFZH/OK 0zZJ9DcGLx/lGRsvcVOepJRl7ftttRzQ+QZ8kzlcS19LEAwXdqJRZn3Z+1kybZHvN67L EXNDs02VL+okZPYBhVAvFl0VLuzPb054sdanPO6+xvt6DdA0wJWZBHSVAFxIGM06MZt7 rwwA+jBoJPSGSLEucTl0PC12ATCeXczcbJmITc3pplmjyOSrmWErmipIzfInpKXDfGHI Y1wPzXuGNp1kk0+mrAQ4GNgSf9F+00fR1LEH3Gu0/RuFloW/mgCHqW4EKXDuzS/wdnEz z3Iw== 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 x8si323284iom.11.2021.09.01.11.40.30; Wed, 01 Sep 2021 11:40:45 -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 S242152AbhIAFuK (ORCPT + 99 others); Wed, 1 Sep 2021 01:50:10 -0400 Received: from mx21.baidu.com ([220.181.3.85]:45850 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242183AbhIAFuD (ORCPT ); Wed, 1 Sep 2021 01:50:03 -0400 Received: from Bc-Mail-Ex13.internal.baidu.com (unknown [172.31.51.53]) by Forcepoint Email with ESMTPS id ED881745EF707FEA25DE; Wed, 1 Sep 2021 13:49:04 +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, 1 Sep 2021 13:49:04 +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:49:04 +0800 From: Cai Huoqing To: CC: Marek Szyprowski , Hans Verkuil , Mauro Carvalho Chehab , , , Subject: [PATCH] media: cec: s5p_cec: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:48:57 +0800 Message-ID: <20210901054858.6365-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/cec/platform/s5p/s5p_cec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/cec/platform/s5p/s5p_cec.c b/drivers/media/cec/platform/s5p/s5p_cec.c index 028a09a7531e..ce9a9d922f11 100644 --- a/drivers/media/cec/platform/s5p/s5p_cec.c +++ b/drivers/media/cec/platform/s5p/s5p_cec.c @@ -178,7 +178,6 @@ static int s5p_cec_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device *hdmi_dev; - struct resource *res; struct s5p_cec_dev *cec; bool needs_hpd = of_property_read_bool(pdev->dev.of_node, "needs-hpd"); int ret; @@ -212,8 +211,7 @@ static int s5p_cec_probe(struct platform_device *pdev) if (IS_ERR(cec->pmu)) return -EPROBE_DEFER; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - cec->reg = devm_ioremap_resource(dev, res); + cec->reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(cec->reg)) return PTR_ERR(cec->reg); -- 2.25.1