Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp318794pxb; Tue, 31 Aug 2021 22:52:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEZjTLoUNx9nAR/5aduCGouC8oPZYS69ZLyjE1OZfQbyMYnOod2/XdOsNMml/lgR4JpGR6 X-Received: by 2002:a17:906:d94:: with SMTP id m20mr34349886eji.445.1630475539203; Tue, 31 Aug 2021 22:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630475539; cv=none; d=google.com; s=arc-20160816; b=YALv32rwE9jVhRRAyhle/KaDPOFJCge+6Glk8KgsanvvLAt6jPj6P7mNelzTYzpzL1 mMrXUnZyJoxDghPDsTrUjqKNmQsOHu2ALm6oMITjh1Pxy9VoFPGpRszMeIyUyCEG4j3v oWU//t67RqI9lv8sSJZTMEcI7jGQmi5A/z7OBqGHQBDt/QtNlNu003FmtjGgpWK7yqtc GLw1VjVkFp3ECLtlvTVLJb7GI1LTtcQdVlX+YmFUVRe2ZREcDRAbk+88/3ZJnLO6gDLK KwCvxjKYGAYcVAiO76N83VEvLRdT5vppvPBNRH7DJqVjlEg5FqVm/IT9LCEucuF/V/Ug VTGQ== 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=0iHbO1p7XWEz8H+rKPa/d3BJfhBe5w4yuhWZt7wYlAPtyojFgkF+FKcBq6gDHmWliC ktPK2b76H6BhiYlJqrBTLK9oM9aefazARGAqYSBaD9TCz7cnvCF9CFuZsb/s3XBhqHnU AAUOSd0B9RHGNdIg1CsxAtIfA3W6cc2vzRlhnq1CsgA8NxoIiuHlZIh3O//lEP6pUy2a Y57nLSb6viZpDKT4ZWMUZAnpeX0utrrxcDhCzMa7NqXjMKYzJ7evZRN7RIcGUVfZw/4K U9qzWyCVINKyD/HozRf37LL/XGIheD6UVn/wHc6n+20RgPtjifGa9AIIVogRgNMq0R4E 40LA== 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 x24si19747711ejv.514.2021.08.31.22.51.56; Tue, 31 Aug 2021 22:52:19 -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 S242174AbhIAFuS (ORCPT + 99 others); Wed, 1 Sep 2021 01:50:18 -0400 Received: from mx21.baidu.com ([220.181.3.85]:45984 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242200AbhIAFuL (ORCPT ); Wed, 1 Sep 2021 01:50:11 -0400 Received: from BC-Mail-Ex10.internal.baidu.com (unknown [172.31.51.50]) by Forcepoint Email with ESMTPS id 694954006B9E883A2CB4; Wed, 1 Sep 2021 13:49:12 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex10.internal.baidu.com (172.31.51.50) 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:12 +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:11 +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:49:05 +0800 Message-ID: <20210901054906.6414-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