Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp322220pxb; Tue, 31 Aug 2021 22:58:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpC334DHEH1m9lafPQgYo7s1xG0VCbGZeZhdadGWvtVLblclAN8011ZlZrF43sd72dNkUY X-Received: by 2002:a17:906:994f:: with SMTP id zm15mr35445390ejb.480.1630475925824; Tue, 31 Aug 2021 22:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630475925; cv=none; d=google.com; s=arc-20160816; b=P/Rk2PeZG1od7sS3NGIQDR17fsI8XxCcTQ5chk5vz7ac5zGsVU4vBuhpiVLmHnBrL4 /zFlAYRjfZ5dJwvlX5BP61qoM5C1sdsUaQEFUK9n82OY+IYVxGkFaxEOhY0qsoPCFJmW 1bQU5u/2iQCXdQVbp1pGTgIPuLQHuZ9spRsZ+qmyPHNP326m++iCHeNN88TY8j7zEIMQ Bz5+wQSfvIOsdfYfn3GjHUGvnE1C3UilY81w1llhF+SjUVBhXtgeF3T/v32+dN6q3qyb CTOpPJA24Pk7C5dS8ZtcwjOBhL9mMjev0du+eDHz1vYiOptDerljtjkbGBYj90p15NaT mtdw== 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=956QTdcf3s3t4/qTTLAduM2O1A0LZ1REE7lKuehZ834=; b=bsZyl2imt7nHYp74jfyJPeT/OnhEpFv7ri1l7JpmTMyOIfPsyAGYbHz/b5WsTOkRHE +UeNR6pL9YQY1myKwE5B5W2zFb4DhuFX/OXl642nMMtL4mdIRlyVqvWCD19zPPANrzVU pyK8f/OPMFXDDKfFYul1JcaSYCtug1JgiNZ34xfD9Y3fqnU+fNRmNyehRwDZ4+H6rfzp 0oyB7CorrEDXxHhV7SRzrOXeUVQH9oiGlHt1zg7D/tdI49xkjFnGM5PETxfj8BU/TuQ8 7j3ohCB2bfTBMvqAViPn4ToKy/yeKoclsIOpcoZPkcZBxgIib/DDABgkwMOobfGaWCKi +Puw== 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 a2si19644816edx.80.2021.08.31.22.58.23; Tue, 31 Aug 2021 22:58: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 S242402AbhIAF5T (ORCPT + 99 others); Wed, 1 Sep 2021 01:57:19 -0400 Received: from mx21.baidu.com ([220.181.3.85]:53230 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242377AbhIAF5O (ORCPT ); Wed, 1 Sep 2021 01:57:14 -0400 Received: from BJHW-Mail-Ex02.internal.baidu.com (unknown [10.127.64.12]) by Forcepoint Email with ESMTPS id 36CC9ABEDD4D5A2387AE; Wed, 1 Sep 2021 13:56:16 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex02.internal.baidu.com (10.127.64.12) 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:16 +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:15 +0800 From: Cai Huoqing To: CC: Andrzej Pietrasiewicz , Jacek Anaszewski , Sylwester Nawrocki , Mauro Carvalho Chehab , , , Subject: [PATCH] media: s5p-jpeg: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:56:09 +0800 Message-ID: <20210901055609.7679-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/platform/s5p-jpeg/jpeg-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index d402e456f27d..1faff037cdf7 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -2850,7 +2850,6 @@ static void *jpeg_get_drv_data(struct device *dev); static int s5p_jpeg_probe(struct platform_device *pdev) { struct s5p_jpeg *jpeg; - struct resource *res; int i, ret; /* JPEG IP abstraction struct */ @@ -2867,9 +2866,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev) jpeg->dev = &pdev->dev; /* memory-mapped registers */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - jpeg->regs = devm_ioremap_resource(&pdev->dev, res); + jpeg->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(jpeg->regs)) return PTR_ERR(jpeg->regs); -- 2.25.1