From patchwork Fri Jul 7 07:20:31 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: 117025 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3091994vqx; Fri, 7 Jul 2023 00:49:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlE/8kkwuX+nAImUbY1fqOF3aDnwlSs/wW/d1qG2TNw0b83sHL3XDqM2PGk+jbUh1Wu5vHNr X-Received: by 2002:a05:6a00:99f:b0:681:9004:3a20 with SMTP id u31-20020a056a00099f00b0068190043a20mr5230542pfg.7.1688716166770; Fri, 07 Jul 2023 00:49:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688716166; cv=pass; d=google.com; s=arc-20160816; b=lPPMMtOmmS8wIINxbecqRpcA4ZVtmSRuKFrL7G/ExZk1bDSQyD1+ZbHFc3J12AELAw Mh2ZkAFLOksPk7ClPOYNpQF6wCt2OzNI9w+I0vlxygoJq9kyGmOmRz5kkzV/59HMp2i6 80cVL7Rn+79Z0TGEsLOwbM0tAiVdzfJzw9MmDFjDEaRND4y6Pbm0wlBxN3xXGWTHOfgw WU79swKwgiNinv3gdVt/sXT37aJw9qpvCrKSr8AsvGKhB5n+gRP8uhxW7Kd4gsXtQ9EE 0sJQ//lklTSV5yNjESk+xVonjRpTX7gNlhKaCprX1AhB7s4ADtzs/lFkOMpkdowHU6zV l1Yw== 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=6lPI3daS+UM0ggiLDXQPd3BbYxuHM1WOWXBknGZQuNk=; fh=WTFhmzzhsO+5Q/8VFH9YUS+fINvQqtxHHn5A5T9J1z8=; b=BNOhHHJiKiz5ZTHS+UUHnFgSkIsFDYWWwCf9t1xVBW2VpIPvWxeJuUTjZuSeLYI+LE n83xVF4ha1eWcOzoGvGjg24/FmO0bMT+rZJh+4bmbuw9d7vl+rxLPx8X4+K+A7omXWnT ECRwCz11+Uviwu759XEThhUhIW+xDfJqN8ZFO2Bw3swMqcAt4dpnaXRYhqvw40MdkAh8 JSNrH922h8/bMQ0fvCa0tuBFFPaEDzKTS3x4gIU6Dmp77AwnOvJ0yz1T9WNCKbK0w0iQ FwNRc+KzPCMscrDnMgvE9ugbs/qlmMxJ34BAdjntlaByVEwZshU+uz03TUHIN2EVLCaF JNvA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mFKVO85I; 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 b20-20020a630c14000000b00543a89c95c2si3102170pgl.207.2023.07.07.00.49.12; Fri, 07 Jul 2023 00:49:26 -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=mFKVO85I; 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 S232406AbjGGHX4 (ORCPT + 99 others); Fri, 7 Jul 2023 03:23:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232055AbjGGHXw (ORCPT ); Fri, 7 Jul 2023 03:23:52 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2120.outbound.protection.outlook.com [40.107.215.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44078269A; Fri, 7 Jul 2023 00:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mEFF59vhho6A4E64kYcLeSoZM0hzBVM3g7uGzXbsUAgRdcXkkYRofMbf/lrazDQTsdFZBHKWXbry9AMNpa3IeA0Vr1cAbaFAQtnVjFpMqY3dorgSX4QRhUmB0dHd6z8HJfF6lBLgueqFarB4ZVZh/mtHBCXsL9W4ef/urw3h3g70Echj0SSrw5IzN1Aog0eVTL5taRnUIHlXZ14HiTq0Xlbg1n81Clva83afeZlEsy9m8SATKz7nGUX2QzBPCJ4qMD+QnUi5+UtgTgi/rN3fxEZ9LPmBjcOEEq3zDlsgw7UF8Pk/t6tBiXwSV6j98tsSg69myDhGrC2fzaJd6zxIcw== 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=6lPI3daS+UM0ggiLDXQPd3BbYxuHM1WOWXBknGZQuNk=; b=R7lmUqGgvb9JBphAMtTmogAn+ncKeyc9N2Lj1+AuKcrKMCS4tdm6s59F2YiludBu6OhsUxAFXgb4uHG+jB7PPKyWjIr0d3ClfXqchHutTxnS2VCS+RSRfmGGyKpZqoUDVefo+aaVHmXKyiXUVjF5ZCLVVsLSg9Xiss8onofndWJtS7HLAy4iaLQZl0WgFW05qDmXDQbg4+rUZazvXAkUQZow+Ve8WVH4NDjX4wIAbU/hu/tDOgBigMopFviGG5Wt5B99q+hR9pBKU8zxPddqUlpKvhalWiK/5m18IlcAc3LnwGQSe2pv3O47N627PB/HNHeanXz3DT7zlL5Uy4UzGQ== 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=6lPI3daS+UM0ggiLDXQPd3BbYxuHM1WOWXBknGZQuNk=; b=mFKVO85Is7y+wu7ax9XevM8opExFtWFcd8gVerpPWKzNmguXrzI0+EUjMSpRzkeS3U2XRXpGjXJIpExiwhHPEzbzv9gz4JweWm28dxVaNlbNH8Ivr+oR5HW8jCwPMlrhjS1ubMfwEcYKvstYAID54/LzoXcPZ7zDK6CaapbUe4jOBQTGbFDW9VK6vkvEVSTlkwHXYSt7YXeRHruHClwGwQS0D7dWAcoAe9Gb73wNmYevsy32wRNc26XYjcshaHqP7ax7ibEiQ/CqWrVbZ4xo4PzBFlsx/LjpGPWsXxONO9N8OeUnV1Z86pCmggO0inLQg3Py1Kvhyk/qfOHt9kGaPQ== 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 KL1PR0601MB3954.apcprd06.prod.outlook.com (2603:1096:820:2d::9) 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:32 +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:32 +0000 From: Yangtao Li To: Thierry Reding , Mikko Perttunen , David Airlie , Daniel Vetter , Jonathan Hunter Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/18] drm/tegra: sor: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:31 +0800 Message-Id: <20230707072034.48977-15-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_|KL1PR0601MB3954:EE_ X-MS-Office365-Filtering-Correlation-Id: 1516ac7c-f56a-407b-f5ee-08db7ebac9fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U+WgG+oP9X+3L5uL3FEjRzC3gPfUm1qVavcGALaJA+OwCB6SmAWJci5zA7+gdXmPOCJVGwY3ECS+FhOW0auHVKLraZYwnEguYv8zXd+i0UbFNCmw6UjT572uWZECwYFQIP2KvHSAbNm6rG7TYnGfdpOsDOie+tRcuqCT3wf3EE+/oe8y1ySdhDINwpYR70jfZrUyy/rKB2LI59jFZKQCj/E6MWAeugSgMBz52M1JdoGPDV8WFYh5VHFE1SASqu1p2AcrUqNH1EblQ2uq+L2VOGlqjXOXzA5323V3zcxaLK8ppc4PkRB6OzuZ7yIEXgF8cuzBQHUXPXn2vhtCyk6X1f4lM6KoNv3yKuxMeFGla1jxBtYe8sDCDLxO0qssmhPNn2CRg9IoGDw3/yIaGhmQ07ejCo6thMWy9UQow+b4iKTErmXH2Y5Ht281p7c2iOEEJjmDeUcvvhx8L9KBxQXW4fg2I/1ka2lGvhh91ZLFJFPC0r+f1m76moZqHr6yJyl6G6sRcZgaFlIPX0XFWysemZxq5xyGfLmm3ScSPZR0EsQLRHzxe0czLUKuH/SxnJDISmsF11w4T76dYmX3nOgbrq9BPwY3DQaQApQl1ENLM0+HaZuG3Tz+yeezWWCoi6Wz 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)(396003)(346002)(376002)(136003)(451199021)(4326008)(478600001)(316002)(38100700002)(38350700002)(36756003)(83380400001)(110136005)(66946007)(66476007)(66556008)(2616005)(8676002)(8936002)(6506007)(186003)(86362001)(4744005)(26005)(1076003)(5660300002)(6486002)(52116002)(2906002)(41300700001)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5jBYFMHFkmOo8hmolyFPLTxzcfiX3Jcr/lJzrVKcl+6sK2iAPU0tFrohryDg6lk8j9mkNKrvkaLHxG7UDtkUGBoBxoula7uTgYqd6HjxQVSK4Se14b+KbckoQY+08q8Hjkopgt5VaGVudsnfLHrw/q9kC5tRfCAy7utW4OjAzvtp5HxLxx/hxttHYdzMYm7xVD4Jgi290Z2eUff8hKGne78oRrNxSbcH1VTzQuML/TSz0TkJS9IR5pZgaiJkceq4/kSaQ4llPI2jEYpIAcDQeT3uA0TkaAJ2KlLL92P6ZQoqo15aR08155FapORQ0xV/Z+wQWQ6OcjfgcDO4l3XmNKGdVmC7+0lpwMt+bdud6jFQOS54s2vM7PeVdbGnuU2dm4TI4pz9iqA1z/rjL4eqTzABFNK1c5XNVFkP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3ucmr92NnNIJbK8s2eWJ+65uCOTf0ed3Rrwwmrr/MArBlwzPxMacIDAEzdqj5mlp+Yv8aMFWg4rEfrVQ2s7P55 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1516ac7c-f56a-407b-f5ee-08db7ebac9fd 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:32.3103 (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: ZHQcM1VlZfBWbINtpEAgR7kBSKKnPjlarm6LAPNSVZiyAaTBbrMuq6eMmdfXlfx5RNk1XVayX5HySOuYVuPD9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB3954 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?1770747243169009696?= X-GMAIL-MSGID: =?utf-8?q?1770747243169009696?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/gpu/drm/tegra/sor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index abd6e3b92293..f23d54626883 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -3708,7 +3708,6 @@ static int tegra_sor_probe(struct platform_device *pdev) { struct device_node *np; struct tegra_sor *sor; - struct resource *regs; int err; sor = devm_kzalloc(&pdev->dev, sizeof(*sor), GFP_KERNEL); @@ -3781,8 +3780,7 @@ static int tegra_sor_probe(struct platform_device *pdev) } } - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sor->regs = devm_ioremap_resource(&pdev->dev, regs); + sor->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sor->regs)) { err = PTR_ERR(sor->regs); goto remove;