From patchwork Wed Feb 8 07:43:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 54250 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3317880wrn; Tue, 7 Feb 2023 23:48:44 -0800 (PST) X-Google-Smtp-Source: AK7set8icpmg9WyEM3U8a9cf5/cagNaSGZtVTS3PXv1Crjplz1gIeAKj5tgsq4yuSXMpIp6Y6+Yi X-Received: by 2002:a17:90b:1d06:b0:22c:7777:fc91 with SMTP id on6-20020a17090b1d0600b0022c7777fc91mr7229525pjb.48.1675842523746; Tue, 07 Feb 2023 23:48:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675842523; cv=none; d=google.com; s=arc-20160816; b=TlsoN8dA61hcvOtQQcBC8N8eNL3gTiXNXg11HO5nxro7JLa1lJhtiBCMkWZElOIE3q /Ch7BxD7STVUuLIlm0gqnLnkjTHQ6mySpM3r/2NFsT0hsJ1q8O+iyoyl6SNMSKQtL1PA ZAT0mHwKKs8E2wuRD/b+5HeDTRxjB0hqxYySG2ws2zKDehH5VloHV4lhWizzK4xFpr/3 wFYjZQSn8XNDZz/xBOJBFpmBZvbCT9ocQNUxncORby4WPT2SM+1oEWlhhis+brpq2ZBh KYcV6xDtStjwCD7YQ1aCDiRYSuJZ8dlAv4U8y9n0J26GDhBdTsabc660xHtTHYs38LNN j2vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=NHinz4sZgPboCuxOQ23JjHSN4KdLxRNv0BY6EP6W9ms=; b=WhOrKvph+1D09kWP7bpiQUb8N1E4pyw6xf9dhiQT34iD2Qh6BaWKHMUmGUzHwAm6jG nin+BBflb5nkEwABGtmqPHqyJenwrQPKFAgmiq4H6tql/qt856SbOQ3AAQm4I74wNlOR afdP0S9e8dd2nv10blkgkUz5doPZiaUwi9Kkqc9gtYSjp3Zs51C8XAqE9T5eowNtrtNU hbRnrFVMssoUR1gOGOTD73Nb126NDvZ+ZcQ+rj4Sy5NO4MPE+5f+HamTT0jcOYKNVtpW lU5wSaJJc1czlR9xXF/oY+7qoJ8CVadrAMT+7azi4U2ldwsPnTSyNZctt9Df7zLHDz3H WwCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a63b00c000000b004e8f83eb5bfsi16125218pgf.153.2023.02.07.23.48.30; Tue, 07 Feb 2023 23:48:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230184AbjBHHng (ORCPT + 99 others); Wed, 8 Feb 2023 02:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbjBHHnf (ORCPT ); Wed, 8 Feb 2023 02:43:35 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E316A1041E for ; Tue, 7 Feb 2023 23:43:33 -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 mxhk.zte.com.cn (FangMail) with ESMTPS id 4PBX6r0kY6z6FK2W; Wed, 8 Feb 2023 15:43:32 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl1.zte.com.cn with SMTP id 3187hOVO031519; Wed, 8 Feb 2023 15:43:24 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 8 Feb 2023 15:43:27 +0800 (CST) Date: Wed, 8 Feb 2023 15:43:27 +0800 (CST) X-Zmail-TransId: 2af963e3529f31d5c546 X-Mailer: Zmail v1.0 Message-ID: <202302081543271680228@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?b?W1BBVENIXSBncHU6IGlwdS12MzogcHJlOiB1c2XCoGRldm1fcGxhdGZv?= =?utf-8?b?cm1fZ2V0X2FuZF9pb3JlbWFwX3Jlc291cmNlKCk=?= X-MAIL: mse-fl1.zte.com.cn 3187hOVO031519 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63E352A4.001 by FangMail milter! X-FangMail-Envelope: 1675842212/4PBX6r0kY6z6FK2W/63E352A4.001/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E352A4.001/4PBX6r0kY6z6FK2W X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757248250442479537?= X-GMAIL-MSGID: =?utf-8?q?1757248250442479537?= From: Ye Xingchen Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen --- drivers/gpu/ipu-v3/ipu-pre.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-pre.c b/drivers/gpu/ipu-v3/ipu-pre.c index ad82c9e0252f..04229c7852a5 100644 --- a/drivers/gpu/ipu-v3/ipu-pre.c +++ b/drivers/gpu/ipu-v3/ipu-pre.c @@ -271,15 +271,13 @@ u32 ipu_pre_get_baddr(struct ipu_pre *pre) static int ipu_pre_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct ipu_pre *pre; pre = devm_kzalloc(dev, sizeof(*pre), GFP_KERNEL); if (!pre) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pre->regs = devm_ioremap_resource(&pdev->dev, res); + pre->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(pre->regs)) return PTR_ERR(pre->regs);