From patchwork Mon Jul 10 03:23:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 117583 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4761255vqx; Sun, 9 Jul 2023 20:58:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlElJ3R17U3xNBI1YGZByqpEJ+XchSjbrHxG+v+AOoEo8mm8+ephWvD2VsYcdgYmgCJHoSll X-Received: by 2002:a05:6512:3a87:b0:4f7:6a40:9fd7 with SMTP id q7-20020a0565123a8700b004f76a409fd7mr10608325lfu.47.1688961513625; Sun, 09 Jul 2023 20:58:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688961513; cv=pass; d=google.com; s=arc-20160816; b=UchCGIMf9HX0BiO+kcrFeoUB1I6jwBTjlIco4FcCKGY+n/dC3xadb0YeX1BoIVP/gS Ru8Z5l1T0+TlrHpQW/6u8WljadWqo/IIi4gvdKvhdd13HpJRiug7ec0hH8NnS5Bl+4Ow +zLAptTiV+XSZisu0Az7+RGkqHr/imp99JjZ9crgIVpOII087B6I96jp3nQt+StWGe8O wPZtnyCa86bb/pU6k8b+IeLHUnjFDkR+sHkNn325tt+XnFYgQ26qwhtTl5XhUPRhr6wn CtCT6VZD3eYO1hpcDReWjPP2OjgHyBsKVEUlH9PNnGBnCRgxh12WkERzVVOvj3XvnQ2E kAsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XPh7w2tfUcUCDzFXMlvzWNOdVB0uj8dkWp6h+wAiGRI=; fh=OkhKJqwgmok9Uu1AW5HLWSzylSfBluM76Bb81dugc3E=; b=p/ww7Bo6iaPkvEGj5HgL3v2Z417V79cxGLSpYXRY10EiOHEhw3Qmu43q2eH0PnlcSg RthxshdRMtoqEld/sLu4yZ5/NgZnquCijSt3JWI3ms1ZuRBhYyQXMQoM87Qj11bO+ZLQ fYV1jOK99/UTCsmlVt5T0PVOcCgDBUgKhRY17CuE5cDfbGLcaqw04y4eTQhU47dVo9Eb EZjGCmrdfLpkHS0OYvgniHLD8Qzp+fCXPS2zbIEXPUCxQ774ijfsIOBGZRNnLsMSaOS7 VpmcqQSx6Aov45N7OmAvDM8HoQp7Q77BLT67cT1+fMwxQmIv5roclvN2pw13CyOVh8hs SYwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=W5262dQp; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a056402134f00b0051d96a56b10si7788382edw.88.2023.07.09.20.58.10; Sun, 09 Jul 2023 20:58:33 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=W5262dQp; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230250AbjGJDZF (ORCPT + 99 others); Sun, 9 Jul 2023 23:25:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbjGJDYu (ORCPT ); Sun, 9 Jul 2023 23:24:50 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4843D18C for ; Sun, 9 Jul 2023 20:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ETAm4LhStVE1uLwhQY9Re4G6Qc+uXClXanZQvJFmbjoKHv85e9bcyZylYWUC1HlBJQ08dab1JUhCgjXKK8IQudz7j0Fwgj5Gm8Z8+bfY0+8aiq4jJ7wZtD3eLh2dw6wsZeH2PkN62TygBbOYqOVtIqeOplKjzidSSOboKZ67RMeQm8atFk8w26J63L+JyTTEnY7fH3stjShHm2aVMVLXma/YHnkL10A0+macR4CaUqoGvicY9/WCD2Zp4hK9tPa/RpFzAEbGWNXIyAL605zBnXsxUxGGV8rt3CINLMc+2oBeTDQ7PCyyikr7E/1OpyVG8rgy1oqVlLrhxY2nJ0LeBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XPh7w2tfUcUCDzFXMlvzWNOdVB0uj8dkWp6h+wAiGRI=; b=AFE2KcZ/ixZet39xiUejnOe85tHFakY8rQQeNK3NMg5NYlOqAmWQNqQGRdKzuh/49LDertw2uTCyl6T7wTw1dR7x5Fox6sLzQj+SjI2AP1Jo3bgbi88TrQhRMc4sATZZIFB9po+LKqCT793c1JbXxp5unRNNCYz9ck0uU28U2ZTNiT0qO5neK4Kg/PSTkgECz1cUp6oDyxUoAbNLCSf8BoBd+2YLyXHlGV2FmRIQcJ0/3jXvPJMaJpeM5HSnzsXSbeNMFU37s7xXAXM1aQOeQUSFIWay0VaR9jAqHsBSOW2NyzLFl0FTvidm+z9rA6lfFTWeSXoCqQHrBKOkwHcmUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XPh7w2tfUcUCDzFXMlvzWNOdVB0uj8dkWp6h+wAiGRI=; b=W5262dQpMFc2426gBEnwK8Nfal8I0j8e76l1cqeid4QPLZURTE1rdM4DMIxpkWDQogTtyEWQmIe40RKenNBjTw4bg5+Fw7rv01QPXrbolhDtFB/R4gk5LHP/bZ5ds9lcthAg0CiZtcf7+/FLrWdH9JwZxTbgPGkCO1J1dcrFSMszeJ2nCycnVqMhj5cu2b3hlNPkKhNZYI8IDqDXCrcrtHq4tBT9A6kCIts9depPjJenggzLUXgV0IRj/I0jQJxoxFHtmZhxqJ2WfhoZodksIBLYILWpkDgpEgTNL68r10iL0ff+a34eDekjX84Yhw5drxAlRpd/uGW92ZVX4OIkwA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYSPR06MB6472.apcprd06.prod.outlook.com (2603:1096:400:47b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 03:24:27 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 03:24:26 +0000 From: Yangtao Li To: Philipp Zabel , David Airlie , Daniel Vetter Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 08/19] gpu: ipu-v3: prg: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 11:23:44 +0800 Message-Id: <20230710032355.72914-8-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710032355.72914-1-frank.li@vivo.com> References: <20230710032355.72914-1-frank.li@vivo.com> X-ClientProxiedBy: SGXP274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::32) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYSPR06MB6472:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e0984fe-583d-4599-8764-08db80f52a25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kYBw994qVInCgLQpzicQqwAG0FxBmAqaFjI1ikujnlhyZ1k6BeIifyD/CR2z4qx7ITbOBgIV1Sqd60cZX/VOHgNzPp1yiJKfV+tlSqn2yeEA0M6pG4PLBJTvo5Tlfp3oEvvdk+FIotiD/MlbFg17mKPQkge5m0slenCSqz9ETkppXsaXqJnfa4q0ZmNySHFQhulZ4tS1sEB+V/S8ept9UwKnwLLrsxcBkoAFfh602R0/lim8LZX9IJWffosz4MVKG/9UL0q9M0nRUfCC2RioI6Rb3/jy8WPkEMeQQfsMBRdlcslHm9JCuVT49aPDYfqYZ0CNZ/BU/g9GHgjlJsAsK0ZFGp9iCUzc+MhZw2vYyXzChANBCqwlfjjkoPBqlhr+exvrZjW39LnUillURK/24NlWrHihzJ63WLWsj9c0XSI3F6p4DFwRT+hNdrJu7C/txbDVN2zSCqc5Cv4Jo4NSnSS4MNJLCJX3mKXIRXss7wiwQpz71k3x3fsIqpc/HFIv7IWLvQKAo0BSlognokQmUx+IAu+AgJfx/4kXPhcSg7TLXTAwzcsU+cLhnMBhdADgBLHL9SHjA5YYABHEj2D3cA2bzEsvil3PbsDSmSDIiSo5VLd2CzQdHmdwCdJ/tZix X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(451199021)(186003)(6506007)(26005)(1076003)(2616005)(6512007)(83380400001)(41300700001)(4326008)(2906002)(66556008)(316002)(5660300002)(8676002)(8936002)(66476007)(478600001)(66946007)(6486002)(52116002)(6666004)(110136005)(36756003)(86362001)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gdCwJHbtFe+gDiL4PvoEBhqDCndITvsSTc5ky4LLlx4xBvTuKlnuPITdHg2tcWWRO8tO+ELX9ut8Qg7dgm48ET/A/N9iP/B8f29t9hZ2C/DMpRPgXhsod9MsJekvlYnmIQcsdorv+F6/qVfur0lNJrm3iJf2d3ZvN9WFGUfPSvbwYn1dMDqpCr2r5hF8GuKpH7+himKrFDyBqjZGeudquGqtLnwIkdTezYp0tIOgj+S/mPkZdTCQF9DU/LWUCPAjvdZc390qsJFVAfIH6wvxeoSrIk3TGa3kLg4NDOj2y/6qOwiM8dAvt86AR4p/hWRWqQs7AnRHxkaVFBzvEFJ8Vn6PSkzw6OkpKU5NjWhwznOk7kTjx5UPO60vSk0nlUpgMouNbcT6pZNCwbkCPc5pAq7xzRN1wr0vL5BuBZ5DFq2DmsW3jzgHlz0XCAez+I0dfZztZsWhLkJHtqTyJ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dVgJim0x5oelLVg6X5o3Nd8on5Al1DFurA3ZzFAXtvdy4n3E X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e0984fe-583d-4599-8764-08db80f52a25 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 03:24:26.7680 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Qy8UlIspDyeliP/O2taJDrp1wx9NZB+piDRgyorAwlxSB0DSYSIfpiUuYGPYfL0MyZi1UjpWO8DZ+OC6sVwR4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR06MB6472 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1771004508225353216 X-GMAIL-MSGID: 1771004508225353216 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Philipp Zabel --- drivers/gpu/ipu-v3/ipu-prg.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c index 196797c1b4b3..729605709955 100644 --- a/drivers/gpu/ipu-v3/ipu-prg.c +++ b/drivers/gpu/ipu-v3/ipu-prg.c @@ -358,7 +358,6 @@ EXPORT_SYMBOL_GPL(ipu_prg_channel_configure_pending); static int ipu_prg_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct ipu_prg *prg; u32 val; int i, ret; @@ -367,12 +366,10 @@ static int ipu_prg_probe(struct platform_device *pdev) if (!prg) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - prg->regs = devm_ioremap_resource(&pdev->dev, res); + prg->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(prg->regs)) return PTR_ERR(prg->regs); - prg->clk_ipg = devm_clk_get(dev, "ipg"); if (IS_ERR(prg->clk_ipg)) return PTR_ERR(prg->clk_ipg);