Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp888652pxb; Wed, 1 Sep 2021 12:07:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqMCx5HtLrQ8VIN3IxaQZwAI1nW46J/8AK7ScuZeuxNVml+WpwaJgqAByB2gEr/UbJ+70e X-Received: by 2002:a6b:8e50:: with SMTP id q77mr883844iod.96.1630523226810; Wed, 01 Sep 2021 12:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630523226; cv=none; d=google.com; s=arc-20160816; b=yycrw3r7RC8EuoArw0d5v7sO6iIq8KeLhdPyL00VZmIQnPntQHrk03wWFFkigwhBrj gqrtzrI0k/f7kwJjQsqbyA5icy8ygNPjkKjrUXFf+5ozwsc4qCIAQWKHpyXpKn6Z3ip9 DPgFdsD3EUIMaKEfiyNP1MbaOIQA/ZxZJ8Dmj+rf6HKhUVRYKraoF6Kb3UMcZoDI07KN H13w/AS/WLDHlXqHDQF9LoVfXu2MEIr1Mlb3HdwT6SV9C3ZNLpk4mdz00zbj987pdz1R J0V9dODHB/+DR1q+ImJ8i6K6IMJlZl8Ea0MRl3RgAGZU6CuFw2I2LLVhWjKQB0ajfa84 3xAQ== 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=omiaaFsWCUxtYHulr92J5h/osOZe0V9lraoq62SxTDc=; b=urcDV1AfwrhilaKOaXBSh9sIMT/eWkFkP1bn3C93sn1QyWmRioeI932EUmFEItITaZ 8EDZJS0zcfRtm7ebFXHgvA+PebMuHO43MAm4JmDA8ZGzhdjIw0bwQ8Z0d1u/mvkPj+B6 s93XAFvhXTTYNtsb+sUxAhhW63FbunzJL8eaUOyPHm3gQwTN88cCbSZQH0PWFPAusUXM yQdar1FiMFWWpYbpqDqvtUYDjHREd+r5Fjc1GEGk047CjSK1BmB0NpWtgk5xnXLYOoy/ BK8j/Vhiy610jsmoX9tL3uVJqrEgBCtELugQnucUlzoM+lUt/PB3+BSCedNsT2aCIvnT m3hQ== 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 a10si257101jaa.15.2021.09.01.12.06.54; Wed, 01 Sep 2021 12:07:06 -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 S242256AbhIAF5M (ORCPT + 99 others); Wed, 1 Sep 2021 01:57:12 -0400 Received: from mx20.baidu.com ([111.202.115.85]:53062 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242329AbhIAF5G (ORCPT ); Wed, 1 Sep 2021 01:57:06 -0400 Received: from BJHW-Mail-Ex08.internal.baidu.com (unknown [10.127.64.18]) by Forcepoint Email with ESMTPS id 9375BACC4CBD38E16132; Wed, 1 Sep 2021 13:56:08 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex08.internal.baidu.com (10.127.64.18) 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:08 +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:07 +0800 From: Cai Huoqing To: CC: Andrzej Hajda , Mauro Carvalho Chehab , , , Subject: [PATCH] media: s5p-g2d: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 13:56:01 +0800 Message-ID: <20210901055602.7629-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-Ex08_2021-09-01 13:56:08:614 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-g2d/g2d.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index 1cb5eaabf340..fa0bb31bd2b9 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -635,9 +635,7 @@ static int g2d_probe(struct platform_device *pdev) mutex_init(&dev->mutex); atomic_set(&dev->num_inst, 0); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - dev->regs = devm_ioremap_resource(&pdev->dev, res); + dev->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->regs)) return PTR_ERR(dev->regs); -- 2.25.1