From patchwork Mon Jul 10 03:23:52 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: 117576 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4753792vqx; Sun, 9 Jul 2023 20:38:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlF63l0/KEuSzVbkk8i6/6/yny1HMgFa2CjuncXdbPtKWUwgMJrj5lebMRVsyuZnmo76V2+e X-Received: by 2002:a05:6a00:22cc:b0:666:d78c:33ab with SMTP id f12-20020a056a0022cc00b00666d78c33abmr15679880pfj.21.1688960308428; Sun, 09 Jul 2023 20:38:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688960308; cv=pass; d=google.com; s=arc-20160816; b=JQoxBkjxz+AyBczw4j0MszNYy0Qh6s0TjBTTR/e98g5vKSVlOa7OX7Oadp3X71jvks j+MnXyBTIRRNkI1F2Fr1Ga43v0qmngj+VdK2U78izlf7kDxPnCKd98HN66tvNFJtAi/t iWt3088VbsmyvJjt7j03+TY33RXWl84J0rW2ObOc7q8iwoYQiT5Ua/rMooWHLgeqwxe1 EI96EInz8iaCBbCzI82aIDQ5iiY2zy/VF18T/nymNn83grNsomh4+WlCZf8PFBdI14lh A/n7FWMwXYcxRytiAqbp4kKzLt5QUIYRNGHYJjd6wnrF5NXWAP5wL+nj2oqzjlZXu+pw VRGQ== 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=FTHUwNgJYW2LzEbNjjtkmcytoExfsoTevmE24+MZRZY/a1E/VAgdtx6c+d4j32k89j LbyVueLRXJxW7H2dtM2Ltz8xAmfTP59PrFE+DMQ8o/m7HeFU0fKGxN+E8b1cnNgxDjwS svYDOVppvMCKSoW7//BqTqTwri6SNzKXHSV9IuZpf4xlo+ju0weqmBw3SAqC/+FWT9Lk w1QwvCSRjkGkeUmmX/XriQvhemtJWk1lloA5Lbhll/yVobQfdFsX+ewDh4JG4YYKSx5o 68ARg3OIYnkR1Zi+pGZvCTauh8UQAZS6WbcweP1/ft9OwfYl57PpaUtBQfzygSFAINIq LbJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JKCgy31r; 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 y8-20020a056a00190800b00678243b2774si8148750pfi.78.2023.07.09.20.38.14; Sun, 09 Jul 2023 20:38:28 -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=JKCgy31r; 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 S230358AbjGJD0y (ORCPT + 99 others); Sun, 9 Jul 2023 23:26:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230262AbjGJD0K (ORCPT ); Sun, 9 Jul 2023 23:26:10 -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 CD3FAE46; Sun, 9 Jul 2023 20:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eZzz4AerefYKjNUryNaI/DjOB+gfMwSl3ENetGy6kIU7iIowAeD9QNceszB99x27VKjly/68cE7+XTOdO3hc+sP4gwrM/flTtFME6c4eiRBvQkiBXX+prEDw0Sop5q+nboIOflNzJLtbVTigsEI1zGBvhX2trxnlENZ13LHL2dN5I4YfraXUF0T0CufquhX6Th0zvRSLbp8GNLUyfnEX57DIiC5ZqSvI/FuuPP3mxDInnLrFhlypFbU2gzHRtZJzvarElmEVtgbj4o96sfGMdkoWCBHJUfPtInKLy5lXlyP0kXbQc/gMfKbFx4ZfuIFkEBT5Uxf/IGhFICbfRFFsWA== 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=kG461iWmbGnacaGgHk9nGFPa/Uq3UMjkDXRH29WRzr10K+ssFVluS9OahExSfXNaoND4rUrB3GuHFRWWFlM/g7k5R09IC2jZF2vAVNgKkvtaxzrpZASpVOxpSqOQK5BdfS4A7Fm4Aml/33UXQoqhWgwc0fqE8NMI3vPUWEqSlt+to/fIIbe5CzImxlU1udGyDBPLT6WN18ZnaV9w+ArR+92v/5QL+eNcafGDhKlB8xGWKeKk5a+iPegZCA9hTZTSeBFMCQvpa/fWLGxIgg5RquYedLsUKlafdJ1GTSIlav9KwYd6fx180zkd8SpWPA8PYxRuVDmtPMOgFTnRL61cVQ== 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=JKCgy31rtDlogL+ebHzNVDqybtIuoUG9/1ty4va+o5rgEB8RmTHSMXib+ZyB5K8Va9kLynivBo5Fa2hjectYpgD14vI0OxeTuUuOiTYQwHgEhkdqntS68ovp18lB95eHASn8BUKpiQ+VW0oowyqPVHhN5P+iW1TENaphJHsKcxMI3osCvxwNDghth4L4E7DMaIp9Gen+dUV2APmteeQ1H/gM7GT6d9GxzPwkA+jFUEYqlTa3hFYd4HhSKI9mKb0+tXGNNCDWqeTt1gjSOv49C2Ia7za6Icp/NHwb7JZFXBCDTImh+dILETHOPDMDAV1X5DBGD+etvP518Bl+7uyP8Q== 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 SEYPR06MB5376.apcprd06.prod.outlook.com (2603:1096:101:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.29; Mon, 10 Jul 2023 03:24:47 +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:46 +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 v2 16/19] drm/tegra: sor: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 11:23:52 +0800 Message-Id: <20230710032355.72914-16-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_|SEYPR06MB5376:EE_ X-MS-Office365-Filtering-Correlation-Id: b0c4bf3a-f947-4da7-c7fa-08db80f53623 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RkZ5UTJqxJK1MDMwcOW7/uEz2jEH7OTaVmlXj5bYnc1F0YaQYWByoxVRpCZgR/YbuucRgF4wpX7YHfRWouWNwb9EbRqRMtOUEBIzDhVtAFNhgA/JlPRQpZmKyjTWhe1KKA9C/zE6dNhmBJUIQ8fzvbjLJginWMWWmpAyEQpSlBfs6i7B9PFEWrGfH3KKL0WVlIT4x0J9CJf+ZWokwdJVW98RGyK+5Jj5o2FIZ7jDqoYtuVumclMmcjYlYLD9PzCUyRf3zMrhT2OINvThl/vLIYuEL7TQf5pl3aGsMWfV6fM6bQ9MulSkwK8zB9yc2831Hp0EdcOVX4eisZz0by9vdvFuZv9BiD/daq685jm1XTW5Mv7vgge9R10pLMKAeA/e4qInSjOK/rp8pp5pla2pNYwCR49BGpTb+QyInkDX4ewDyucMDCx19gElIT+Z1OSutXzD834mBCnOiVi8anzkXdRMZrPSrQKZ8ygw1rtLbONGqIt+DqtNznM3u0U0hfwDDZvAGOGsVxlvlpNpl9oyPPDXhVQMejjuP6sT8C5sOUoS9ey6Ybj4lnDjNxu9cloST2dluYEgPYDYydQXL7kc8kPA1yvlmIwpn+0b67BvnUDp14sP1HqGEkryXMD7Z1rU 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)(346002)(39860400002)(376002)(366004)(136003)(451199021)(6506007)(1076003)(5660300002)(26005)(478600001)(6512007)(4744005)(2906002)(110136005)(186003)(83380400001)(2616005)(41300700001)(86362001)(316002)(38100700002)(8676002)(38350700002)(8936002)(52116002)(6666004)(36756003)(66946007)(66476007)(4326008)(6486002)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IsZ6HUVMG09iSZ+QwVTiFgoU0SMGgBdUt+gZTVYHGnbk4FLuufc7/yrDR/stwS4wu2Ytg98j21REKmvhru9sk+tLuvSjeIeLgsyUyMsYXt8TdlI/iTvcBK7sUuAyD07p2YR7os7So8QaLGpnAneFNtxQx/dBSwh/2skWjCuX0RNzcQJ7CTRdxKLJRXib0WFkCKp7csUe0iwwN+oIH2xwp+G38DxYMF2ngFu/62KSq2KI3PNbsytOqhRtSoai1MLCz6UcGcSLDRZ0fnv8J6OYNyjtHAgXmwJj6WJWPjCAB+HQAj1pauzR0ljeAvCx4K5AxHo1YIXYkJbC0iRUV5FGhWNSN0t9NpDD9DoN/NN+NQBvM5G91Tzx16MAU/VdAAkqfPXhRR38V+07Gq1v0K3nUTDI3zTVrIsb9Gn6u+z9Q9GE/DO2VOd7kScqOAXnB9yISPIpmNJ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5XjHujZfbVvXoXWkHJdI0TFAFaa8NCQHFbVEg9bWt/+RGypXcqB4hL9 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0c4bf3a-f947-4da7-c7fa-08db80f53623 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:46.8885 (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: yeig+ctKAYL77wAh+UAeTcaxEk2pjXVsUNLQNXScVDH2/d2zT3u2ix3yXMbhv09UtcZdIkMYbIB8SbL35zv9nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5376 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: 1771003244385751364 X-GMAIL-MSGID: 1771003244385751364 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;