From patchwork Wed Mar 15 00:30:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 13175144 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2557C6FD1D for ; Wed, 15 Mar 2023 00:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jLghDEjqrcXQLR/484Pq5FupjbLNhM8Ab9XryzGtsdM=; b=ff3rbKJlY74Zf5 o2bUWB3MmTvDDRWNGx9nS9fs5GS9A1/AONHNuQ16pj5vy8OTx+M9L/R0luIZh4ViiPIEUMYusId8Q S992eDrl7M8Wc4DW9KBsojHWkbwpNMfjOtxkQu8z14Yw7/gY77ml5mWDAsKx8C8To437TOCMvSYJq C4bOGv/I5A5rcVcO1YUhNWtDED2TUFYN15wekvPmbg9jH7r5r1pqqz7smH12Vg/uD/kVXPtFPU5FX lKspOw4bbt0bVXST4B3/1vdkGCvDzWqrPEtn4upObG0wI+hKU/caSfXD88t4BhB4sZTvP0f+yLHWb UMA52GTY2HqeuYlNZApQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcF29-00BrII-1h; Wed, 15 Mar 2023 00:30:25 +0000 Received: from out30-101.freemail.mail.aliyun.com ([115.124.30.101]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcF25-00BrGS-2J for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 00:30:23 +0000 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VdtnYOb_1678840210; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VdtnYOb_1678840210) by smtp.aliyun-inc.com; Wed, 15 Mar 2023 08:30:11 +0800 From: Yang Li To: mchehab@kernel.org Subject: [PATCH -next v2] media: atmel: atmel-isc: Use devm_platform_ioremap_resource() Date: Wed, 15 Mar 2023 08:30:09 +0800 Message-Id: <20230315003009.123827-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_173021_916777_DA308911 X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, eugen.hristev@collabora.com, linux-kernel@vger.kernel.org, Yang Li , claudiu.beznea@microchip.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Claudiu Beznea --- change in v2: According to Claudiu's suggestion, make the 'Use' to 'use'in the commit description. drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c | 4 +--- drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c index ba0614f981a2..eebb336efce7 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c @@ -389,7 +389,6 @@ static int atmel_isc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -403,8 +402,7 @@ static int atmel_isc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c index 01ababdfcbd9..beed40fe3f91 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c @@ -378,7 +378,6 @@ static int microchip_xisc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -392,8 +391,7 @@ static int microchip_xisc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base);