From patchwork Fri Jul 7 07:20:33 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: 117022 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3090355vqx; Fri, 7 Jul 2023 00:44:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFxgGIEIVbB4Fi7zC+b4ZHcobHbDiekqcPmK/hH/y4sLxMHasPsAoQIg7q4mIG8t4T0/3dW X-Received: by 2002:a05:6a20:12c6:b0:121:fd18:4b51 with SMTP id v6-20020a056a2012c600b00121fd184b51mr5115603pzg.36.1688715886440; Fri, 07 Jul 2023 00:44:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688715886; cv=pass; d=google.com; s=arc-20160816; b=lwjC4pHcd9KVtg7+1VLt2V9k8BvJLmUWPXs87QHHVQ1xVMpHHF49BRAspHId41siwf h6Zdvi+ytJsKiz8olE8L+HaXU6Yd6iH3WbAEM5kSpts+evKVb8BMgKgdANUzXVZhCGZ4 ZnM26TSovZqeAkOaQZTZ6TWqMr6JLq99UzlnmDt0oHfP4k1qHKP5tlBwNmbDehi//kZA 8LIzXkNUcevAjym1wkzrX+9KSYb5Qho75yHctO9SNfE5M9HELKbNVuap8S3v9B3OK+s+ 0utd4XqYbQyjLnl/jQGzM+xuPAgzCeQAxsrru8eW2lbt8YJj/jbVfb2dL1XwaKau4RSB d3uQ== 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=hWlxDQgJPt5iRXpnTJfIfafjSNsW3eAZ4uVj1DMmoI8=; fh=Vp1JkYH52VUDF5gnf6B17H8ZKTHuP3APbYFBUGx/UHg=; b=lSYFNUs4jW9qA4VJ4dLQ0Fo0Ti+D2Oau4nX4ryxSBlFKFcNE2xoYostEZkJnqgQVi8 cFXidSQn+EGF8YpB50uMAshxSagI9AlFWydzFoyBwaN8c1fJ4cgOIMOMbmch95rV9wKN Gz6F4FIZdNZNMN58YojMj7turQ5tUc8OGluxmI0PzI0zSGB8cb26Rgle49WQWirRO23f Sw0ktqlpW3ZmpBWKHJ90YHERxyStdtDz9ROJnsoHeHUpU3vBErojKhFhRilDMgspLegY N26l+82HvAhGSmBr4VYpBXY7jEg5gUD2FoSe+r+A+g9yABw4NMJtpY9Lc1jmoZrmXCks gg8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hX0iCBD5; 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 cq23-20020a056a00331700b00682a0e45b59si3109248pfb.85.2023.07.07.00.44.30; Fri, 07 Jul 2023 00:44:46 -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=hX0iCBD5; 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 S232134AbjGGHXp (ORCPT + 99 others); Fri, 7 Jul 2023 03:23:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231566AbjGGHXm (ORCPT ); Fri, 7 Jul 2023 03:23:42 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2102.outbound.protection.outlook.com [40.107.255.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A68D270C for ; Fri, 7 Jul 2023 00:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jbcHiV77zGTTF+86IoSidXR0xxPfw47DNRcAMM14G6DTea+fTb5+OjxFzIYH5S+vikr0t3w01aLpJo1Vtyf2hsr4b/rw7IrcY6GjyGhRakJsSHLXJ9JPyBZEF93HmO/DH+0LrS1GzYGDYat/JAY09qhg4c+2AmmpJSeBR3ly+BXVaB4SMxyD8XnUAXEm7XI5mfufikKCJN8W5ieSwIfxlXLHJltJb8OEYfgBximZ8bAUtzuT5bdYFr86wUK+KpNebq0V6SJDff+dEHqKBIm4bzxUdQbRngACj4WuJjtrWFDSdCgPrcW9+GD4zsvbesDCoVTj59f+5VUUykukquwpvw== 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=hWlxDQgJPt5iRXpnTJfIfafjSNsW3eAZ4uVj1DMmoI8=; b=SEMzNy9KwzDq6/vwR8FPeX0HhSCblChb1qqRm0bcxt092JSwCSih9/+9HZwrCSsx9bJkDJo77XjWPiyYlpac3NifyfQuOFThBKufTeoVuiqwu/tWlW/qWB5Y8fqWrrNIW6ykshqETk4KdFN8ZOfYVHWfgD85byMUrJDKdow+OMoQsrsTiaIpvOxZ4y30SPti8KxpZIIv88yrnkvWaMxoxAz1C2gAGWYdiG/l3wd4Z/wsskTNn2FrFSoVCkiaqnQnJc1HRe4GaEtTMN5LKJhT2kuoayod/Jnk94EDlytps34ROlP6i1pdGEO+SB7ip48mcymvIq/wgh5OwvUiNGyQeQ== 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=hWlxDQgJPt5iRXpnTJfIfafjSNsW3eAZ4uVj1DMmoI8=; b=hX0iCBD566E65htPEKxnP3xl9yWnTKNbcHlxeFRvM8ZH06f2Se3xWFvL988YHFsnZcl5VgmIVUl6VpwkCDs4CLO2qsHKYQW8kgWieK1N26W88SMuxcPdl54jtwMMlX/nAAUuB3c1J1bsZjzqDMYCx4XpVjGBwQGI39aRNXxiBlppBQK4oCIje1uWtONoDfIpB0CdSzJthunKyN44sJWAEye6/XedibVUCh3mw8pndgXuHiplXyLF2WATjxf+ZZ9qiKCAS/P5zI3i/sxRCpSxr9uMnMVBVsyuBQTGoFdllMKbPkH1sr+FWslLwUTsGzZE9ZflsBGCxpvGAOZGhigsfw== 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 SEZPR06MB6743.apcprd06.prod.outlook.com (2603:1096:101:17a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 07:21:40 +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.025; Fri, 7 Jul 2023 07:21:40 +0000 From: Yangtao Li To: Alexey Brodkin , David Airlie , Daniel Vetter Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/18] drm/arcpgu: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:33 +0800 Message-Id: <20230707072034.48977-17-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707072034.48977-1-frank.li@vivo.com> References: <20230707072034.48977-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6743:EE_ X-MS-Office365-Filtering-Correlation-Id: d0954b82-994b-4ef6-d6ae-08db7ebace86 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VkAQNHpbPbcria/cIToEJdttYMWZyfZt+jBLzi1m9yKBNx7FVy7Qz4XL66qm0g0C9zAv+1VFJaKHzbuHP50MBCjqMLL1tI1nc8afEfSGk5fTa0iNvRlRG2ObMBZOmonDA2jIG0r0LehDYI3vZMN/wmqahTPaNQOCi749dMAwNzQdo0ygvvkGF23jTuqfIKMCnBCPYTdaWEaNlvnWZdxCOt5scC6Nmw0UI2wAf/hKPbYryWHXM+xT12TGN+KjA2iMHMFZMzD/ikIVlYaRng4Ha2E0UmS6UxxMCYFvKPu6HUHk6bBzRSmPsIyxu92AOjWjYqzjxZOayGohD2b1yBg3T5xhqT8Q75dmMF4ALg9gpK8+A/AHk8mLO4Dg/goPOLZtn9dJXVQdsYa4rqQQfRe8r0aiHrH2gBZCMBo5XFI38khVoXBoU7YZl0cKXuTdy5sQbmt6lmuuQO9t8ICyX5l5Hw+eL272h59odr7hPdGQK4Go/oQOB/9KJqXKcRbecgv386drtV98ixHWl6OJPQRCQIrmLwlgcZ6YMTNhVU3MiwAvqX7ntECh8lILarZO8TJ7khThNpMHXwZ0EzB+TMikuDoG7tUzWsd4PSNpQfk/BL2nupC2UoBHmBqNxssjWFJ9 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)(396003)(39860400002)(366004)(376002)(136003)(346002)(451199021)(6512007)(6666004)(52116002)(6486002)(478600001)(110136005)(1076003)(186003)(26005)(6506007)(2906002)(66476007)(66946007)(4326008)(66556008)(8936002)(8676002)(5660300002)(41300700001)(38100700002)(38350700002)(36756003)(316002)(86362001)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CMHiylyK4ft8zlwn1WrFTy4actvCZQtFa5za7arHhb1lA8S6lLIltSX72+mIDfwEjhqAfE6dKm3iY2f8RdT383I3He4hgmx8h7Tt7CkFzSyxUa4wiNkxysiG+Ccwd+eQN+qVB/CWAVIHIPro8MBpmpGN7B/d6fTyGsiJ9GDNFchc/a0YHLuTHYX6FMexhTH05UOu8fQ2sk3zISTaP+gjCmnmbxDIpbbL8itOrPSyTxsyGwubi2yUfNZolUCp7vUwdNPe5i4xULomIK11pIHvGxJCrlramZjb5tkWbpu99SBAdPif88Fxn4Rm/C61BEKNkAU26YZ7i76RvUCRSqvWxpW2EjJwP0TgY1h9f2m4J3trK4GnCr1AnWVwZVRXg4lmsRTi9S4ABI38qHT5B1cu0osJdm0V5+/Xicdfl9KOeSi87mKiy1BjuE7r9DpOFA0pMmIfV559RnUEKnXOx7/NU0B1q5MZjgy95SvRw5/Pcez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MBJl5q4L+NCda6VeTb7NACBMO7RD X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0954b82-994b-4ef6-d6ae-08db7ebace86 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 07:21:40.3037 (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: a2xVT1UM4zwEYqOS8IgXGtWiSltbeq1uHEGMsZGwfsN2DD/uGDjnFYT2ThnIomuPilUqN6tlgv32270XIey0/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6743 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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?1770746949004450760?= X-GMAIL-MSGID: =?utf-8?q?1770746949004450760?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Alexey Brodkin --- drivers/gpu/drm/tiny/arcpgu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c index e5b10e41554a..3a5e66d909a4 100644 --- a/drivers/gpu/drm/tiny/arcpgu.c +++ b/drivers/gpu/drm/tiny/arcpgu.c @@ -251,7 +251,6 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu) struct device_node *encoder_node = NULL, *endpoint_node = NULL; struct drm_connector *connector = NULL; struct drm_device *drm = &arcpgu->drm; - struct resource *res; int ret; arcpgu->clk = devm_clk_get(drm->dev, "pxlclk"); @@ -268,8 +267,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu) drm->mode_config.max_height = 1080; drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - arcpgu->regs = devm_ioremap_resource(&pdev->dev, res); + arcpgu->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(arcpgu->regs)) return PTR_ERR(arcpgu->regs);