From patchwork Fri Dec 2 02:25:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhang.songyi@zte.com.cn X-Patchwork-Id: 630520 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 222E0C4321E for ; Fri, 2 Dec 2022 02:25:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbiLBCZN (ORCPT ); Thu, 1 Dec 2022 21:25:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbiLBCZM (ORCPT ); Thu, 1 Dec 2022 21:25:12 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31C0DCF79E; Thu, 1 Dec 2022 18:25:11 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4NNcGr4z02z4xq27; Fri, 2 Dec 2022 10:25:08 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl1.zte.com.cn with SMTP id 2B22OxuD063310; Fri, 2 Dec 2022 10:24:59 +0800 (+08) (envelope-from zhang.songyi@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Fri, 2 Dec 2022 10:25:01 +0800 (CST) Date: Fri, 2 Dec 2022 10:25:01 +0800 (CST) X-Zmail-TransId: 2af9638961fd28cc4e16 X-Mailer: Zmail v1.0 Message-ID: <202212021025010725751@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_media=3A_microchip=3A_microchip-is?= =?utf-8?q?c=3A=C2=A0use_devm=5Fplatform=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl1.zte.com.cn 2B22OxuD063310 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 63896204.000 by FangMail milter! X-FangMail-Envelope: 1669947908/4NNcGr4z02z4xq27/63896204.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63896204.000/4NNcGr4z02z4xq27 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: zhang songyi Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: zhang songyi --- drivers/media/platform/microchip/microchip-sama5d2-isc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/microchip/microchip-sama5d2-isc.c b/drivers/media/platform/microchip/microchip-sama5d2-isc.c index ac4715d91de6..66c690a88392 100644 --- a/drivers/media/platform/microchip/microchip-sama5d2-isc.c +++ b/drivers/media/platform/microchip/microchip-sama5d2-isc.c @@ -409,7 +409,6 @@ static int microchip_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; @@ -423,8 +422,7 @@ static int microchip_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);