Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp318744pxb; Tue, 31 Aug 2021 22:52:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6zENOiT19sqfz8XMYCDANLUfprvBzWbPVTCMD06C7qmNBUfiSGaeUv+hO2UgdSfIhRVN0 X-Received: by 2002:aa7:c514:: with SMTP id o20mr26292502edq.318.1630475534075; Tue, 31 Aug 2021 22:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630475534; cv=none; d=google.com; s=arc-20160816; b=hIElT638BCQBx93e2Zlz7e5pAZA/NivGllRaxwqqXwFeddDsiT9VrsNXYd+xW4oRfj qHAIRqCSTxrcdAjrNHFAXQsn1ynLhhA6xXz93DlA0/0XNJfkaf9q+K6/gtZ0OlwEbI1z w7MNlvpFQ5ldPgNqpLlrfvl5pyObSVnKhWK1ruUgARzYzAcQaezoBGB+3IAZhaBEyMEe mJvEOxXJBT8hUZoJM/j/oB2a5sKPA7LQXAepmAbZcmRjB+qwk7ormggZW/uLoIJmIiIS ldfSPnoFy/9TsbPUxbJIQHoQXuseRZVHkz73UlcKU1BOXFFjVuD9icKFTBhyvl5ZiZ8s z8iA== 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=mKcCBo7325zJCpuRRzRfmIR4YkGytJNasli7tw2BJVqrCBbQxusx98fags6U/SwNcE NgCaChdi09AJbUkSAX+ndwJG2p85Ff5HGGKH8SppToWeY2RZPQ8WGYxIiWmUBlFrAOAf idynp2O12kE3VQlBJGTXIZC73/jHLcvOohxMM9Z5drrGpPmjdjstFhFW8TF2GXtVwvxp JWKitW5oM5PNm7q5RqXlBeh5I1M8TwCWVzvGFW9jfQCqV+zQnmdhHPcTmHvrBQG0fpuS U/8urS8kbbID1VLGmwge0YEeH0Y9BcSb8rD6adv9maeeTiXUa24bCqChjQziDPt/ng+F Evdw== 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 kl2si23768862ejc.742.2021.08.31.22.51.47; Tue, 31 Aug 2021 22:52:14 -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 S242190AbhIAFuH (ORCPT + 99 others); Wed, 1 Sep 2021 01:50:07 -0400 Received: from mx21.baidu.com ([220.181.3.85]:45618 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242161AbhIAFt4 (ORCPT ); Wed, 1 Sep 2021 01:49:56 -0400 Received: from BC-Mail-Ex15.internal.baidu.com (unknown [172.31.51.55]) by Forcepoint Email with ESMTPS id 588DEF718A0D40C4FA25; Wed, 1 Sep 2021 13:48:57 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex15.internal.baidu.com (172.31.51.55) 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:48:57 +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:48:56 +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:50 +0800 Message-ID: <20210901054850.6316-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