Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp322504pxb; Tue, 31 Aug 2021 22:59:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSL1zduivNPku/k4MjQQZJlNfxLY1F0vZvNoOQ4lWL9GzwpM8n0wiDy7yJU/EcH805n/2L X-Received: by 2002:a05:6402:1bd1:: with SMTP id ch17mr33147348edb.99.1630475961918; Tue, 31 Aug 2021 22:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630475961; cv=none; d=google.com; s=arc-20160816; b=T0j5DdLKXxNLHlug+XEAyQ52SyOWRIV8EnIeLlewpRPNiy8pLCPgI64YaArUo3pYny y/RNK7rw9bqFqnvbL/KdxvHioTBE01QnGO4Tz6kkY56x2qDuS7NfxX8PG1voQ1PpVZY8 J9dczuWSsBFPjFcaef94LTuztN7x8qjkXs0PcGHHIN9zZVUvQtnmB+KANya6Ro0BS10b ht0jeMC7ogLi8NR26M1WQjQRBhXYxlKqrE7BPIOUWkzCcmQn66ZYn8Bjgx0H1arYIlCR gyaHe4WxsduZMHZxf1W14puGajXt/Lg57hnIC1/CGlWj3EPCJuJGehsYH93zWq8ITd9G Hl4A== 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=Tw7JWI4flNiX7YOh8uxftXl9QHQmMHUnHck249hRwag=; b=J53YQT6wAXOtYbLd/DXzS7N8XoOzgMys/73iFSIvgPyX2bvrJv0ds1Da/mIbwzbH88 vsxT6tSs+oUVfHdCxXfLW0XospEtOKP0K3ZTRJzjt4wi/VjXKHByFC8i8eYk4B6tX4Fu zPopHTwWRRrGvX4jL3Zoihd2m6DoHqi0+AfHl1OGaguKBsHloioukaen1u4bjQLJzAhW Ms/hEBSAjYiDk5iWm5tp1LJbk5rcY8b1C8iCPf69bbTlnguQlLm9SeI+YsoI3FQnIFiy ueLQL0dPvTUkH7UCB6TMn6hkHk7yvk6oP+t87b7zlptwlNuCDAMProqLxlOJf1Ve8yeq wi/Q== 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 k8si19549523ejk.222.2021.08.31.22.58.59; Tue, 31 Aug 2021 22:59:21 -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 S242424AbhIAF5w (ORCPT + 99 others); Wed, 1 Sep 2021 01:57:52 -0400 Received: from mx21.baidu.com ([220.181.3.85]:53924 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242410AbhIAF5w (ORCPT ); Wed, 1 Sep 2021 01:57:52 -0400 Received: from BJHW-Mail-Ex14.internal.baidu.com (unknown [10.127.64.37]) by Forcepoint Email with ESMTPS id 4E6572330115207845F5; Wed, 1 Sep 2021 13:56:53 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex14.internal.baidu.com (10.127.64.37) 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:56:52 +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:56:52 +0800 From: Cai Huoqing To: CC: Hans Verkuil , Mauro Carvalho Chehab , Maxime Coquelin , "Alexandre Torgue" , , , , Subject: [PATCH] media: stm32-cec: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:56:45 +0800 Message-ID: <20210901055646.7929-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) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex14_2021-09-01 13:56:53:174 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/stm32/stm32-cec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/cec/platform/stm32/stm32-cec.c b/drivers/media/cec/platform/stm32/stm32-cec.c index 0ffd89712536..40db7911b437 100644 --- a/drivers/media/cec/platform/stm32/stm32-cec.c +++ b/drivers/media/cec/platform/stm32/stm32-cec.c @@ -255,7 +255,6 @@ static const struct regmap_config stm32_cec_regmap_cfg = { static int stm32_cec_probe(struct platform_device *pdev) { u32 caps = CEC_CAP_DEFAULTS | CEC_CAP_PHYS_ADDR | CEC_MODE_MONITOR_ALL; - struct resource *res; struct stm32_cec *cec; void __iomem *mmio; int ret; @@ -266,8 +265,7 @@ static int stm32_cec_probe(struct platform_device *pdev) cec->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmio = devm_ioremap_resource(&pdev->dev, res); + mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mmio)) return PTR_ERR(mmio); -- 2.25.1