From patchwork Fri Jul 7 07:20:24 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: 117015 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3083973vqx; Fri, 7 Jul 2023 00:28:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlHeNkJUfP1o8PTYNrtjFr9p9Sor60TaO1acjiWBpftdAXzShpAwU4rAwI1Lq6XmyYM6BUa/ X-Received: by 2002:a05:620a:4487:b0:763:9980:c895 with SMTP id x7-20020a05620a448700b007639980c895mr5185770qkp.70.1688714896758; Fri, 07 Jul 2023 00:28:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688714896; cv=pass; d=google.com; s=arc-20160816; b=vp2821LTyVxlFmZt2SZ17gW4wnsCgNKla6iwD1F0nFZ+4unNQBF6jH+vj9xM/VCrC6 Kzc/Sy5exvE0+14dkkdO4cQ2xu1mddRt+H6cSOf9vh8AsyxWqe8mj5gCsdh8Pj+kOQsd 6GgcMn8Hbx1KiC841ansV8a5sVXNDCC8fingiQk3Nsb3jS0K4I5JIhYtP2rGM8WuK1mR WZ5hMtizevntxQyaPfvviMBsiLStOkqkB743eTujXW/me0xhAD61AjNtFMts7Aw7Pohq d/ZyckqQtiTqfupa8Tc5mjf6QwIHXa44kRAA0CDwQrWJkIvBL/FZFWoUriQJr/93S7YL BG7g== 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=nEl3Vs5H/lT+04CKc95r4c0yu8RtZ5y+LJcwuewX1o8=; fh=OkhKJqwgmok9Uu1AW5HLWSzylSfBluM76Bb81dugc3E=; b=Sf4FCERPu4Ql/5O/loR0a7M2THMXee1VPv8d9OzBf6slT5zu4wWIH5ztU5R/b8DM/3 j5bISzupyk3y8xpbbgzkTO90BsvSwlY/NNeR6U6ECuvU9uO7gWYdIVKxD/rp3KiH7BJ4 MWP8dPrkcXkmbCG9tp54GenSksDtA2F3oXuhrf03T/6mqGjtyHhS46fqvVEEanSxkPmR XMb6O+6/9CHG/GeCiMAsFXmt6F2sKbl2X8FHFkJCP5fjvDhg4wsvW1lnWwC3jgOLm0fq 5UQctxnOF8M8kCYkSWSvAnPrki6NsOfFdTO5FaFxTXE4MO1F0BnVWoHSngeRRaOxE8zc YIoA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=m36uZp3k; 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 j13-20020a62b60d000000b00665e0165510si2931774pff.252.2023.07.07.00.28.02; Fri, 07 Jul 2023 00:28:16 -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=m36uZp3k; 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 S232159AbjGGHVW (ORCPT + 99 others); Fri, 7 Jul 2023 03:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232408AbjGGHVR (ORCPT ); Fri, 7 Jul 2023 03:21:17 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2134.outbound.protection.outlook.com [40.107.255.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 671D12116 for ; Fri, 7 Jul 2023 00:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K+IAqfpygwTyejVG/xWVCMSPg/hB9Ja4jSoYgLMf6W3dJ6ilgEBf3f/ox7uNE8XC/sohoiLB6/q385BXicxbiMvWDZ65pjs7RRYA5RzQXwkO7ERSr4HHtIS3lN6yrhZXo9bFWcufiIKVhlG+d9vSXQWopYvN9qpnD/pyq2QRxW4B+73/ZyiQE5/wYRyqTULEBk/mRdxhbgCq1U+3k8BqmCKtxOPFV7oegvxFG/SH3eAzbbe0zR6zsaFnZlepjR92RF0nQKdpFXpbnB1TJKb27iRnGV4Ni2kWNqi6s0V2ebyNBoRkDqM14MmzNQ38JnXWsZrI/RgkjLCem/jQGTWD4Q== 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=nEl3Vs5H/lT+04CKc95r4c0yu8RtZ5y+LJcwuewX1o8=; b=QevF/v7qQyRdkIqLnNOSOYGvcWYTqekvGzH5JxSOZZIKfmf4L38DquWzS+fQknbP2S6hXxLGE/uluAqIFP8TESOrqDb0rkC5tH1tAgsfwiFg9/KSpJ9y/nNx4rfwCNUIsWWYD1DI66Ropa+FSU/3+6Rjo31cMSAgFxvGqTzxFWKLaYt2e8yd2Cv2wBlWGjsMWrrDWEuSFS7jWmgsTB76ov2fcff7fPAJ7iHN4YUF/b6SWxvopjQXIzoo/QuoCO8CshOwh8g5anksuL3RVwpEDBM3Izld/+ODddggZNe2qXltLnDbea/f2Eq6PeFzOVV7EFYCDktLXyLMRWzgmDC71g== 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=nEl3Vs5H/lT+04CKc95r4c0yu8RtZ5y+LJcwuewX1o8=; b=m36uZp3kG58OjWtQe4OewyqJBbiWRxnZbxS5z6HtKDq1f1hXeSmGs9u1ZrKInuUPx/Az1JjTrqkG/wpZZ3opkf/HjZLLfHZMdY/HPZM3lyPEz4htkdBgfQ0itQMGLJqPDAaq8h3H+pLwt0m+NlTpfN7p536MMN89WDgy1TrWjEMNO3bWIjAcf/GgClZ3Arbl7zviW7tn43fDIX2nkJgazVr1Kv7s0StLQL303KqZEC/FuR0PXBQ1D3Ph+ooux4ujTYmeB1knzpQFGX6gb1PVLY+UkF3qUPohVCSs9g3SBnVxIKezqnK8XPY1zKDhP8Vl8TL7HvADQ8gCJCnj9LgAfQ== 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 SEZPR06MB5342.apcprd06.prod.outlook.com (2603:1096:101:7e::11) 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:01 +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:01 +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 08/18] gpu: ipu-v3: prg: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:24 +0800 Message-Id: <20230707072034.48977-8-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_|SEZPR06MB5342:EE_ X-MS-Office365-Filtering-Correlation-Id: 94f65122-0ed1-45f3-8d69-08db7ebab790 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I0G58zR99uIa5qqTjvCowrPPYzNRPjfUNjd4+WflhobyNcxtQTe47YJ5mpWE34NuWNcdBbv2wLabdvoyrBUjqCXHUFMSXH1AT8BgZrD+QBod4okDmCAAUWkmss9pyHKXTxgVZST0w4SNomjAcl0dXHHiS2U8oadEI6wT6ArIYXqswxn1hjgV2iFF2VeeDxY1TGz9OPsekhtd/mrCMDziltMeQlsU2T+EVk6zodYrMh+s4ttVq4NfNktVsiStZCh+f3eMdGoZPgG1yEGAckXHmZTEfBUGNVthwzO69XDnNbNMSDkGwo9gV82ZwoBRPZrV2go1FiXRZ/R7VbajlBc8ipnzhq9xdb54rFx3zaBYnwt3wc0dFx0yVnYMQv2+pnEIcxkh3TdpI2LpFeq3qbVkN6Q8FGWMunXYaUkI3IWpAcpE6iKcqpIWbOb+9Hmstn3s6p+hfTKLln6mbc2rv5toQLH7WfWEMvL3cOfW1YpBagpMFYBzdoYrwsjtkjiHn4dTm9ajPZkf9g/Swlyaz1Ve+q383My5cDxb6ExGQFcFabhSono4b7lIqS/1PnE24qpbGtuy2FTDkGKmt5XWH5JE+RBZoG+OIhV73LZWaAq5inIkO7r3GtOXqg4JUGTv/vfq 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)(376002)(39860400002)(366004)(136003)(396003)(346002)(451199021)(41300700001)(5660300002)(110136005)(6486002)(316002)(2906002)(8676002)(8936002)(66476007)(66556008)(66946007)(36756003)(6512007)(478600001)(38350700002)(186003)(86362001)(2616005)(38100700002)(4326008)(83380400001)(6506007)(1076003)(26005)(52116002)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m8qcpvmorlYuvQuHkCcYlbGYgTRLarb/t8MO7CjSGmNCau/kRAWpOfdnNqV0TxkSx9P+LNkk/VjkZFbliuAdKh6SWVKC7jG6tRTjesh43f53uhJfJ4BEcha9txnGf5VN+THaZi3KtMe2QPAZzTvMgEYfYTU1CT71yKynky8pf8rRguodUbLrwtbaeQiqrRPpnCC3Ma43yB+PmIHYgqMbyJapsiFQexsJE8ZqTLuMk2RUonhNTPI3H1NJf1aVYRYMih4vAq4pwOGugMTidHISrgp5Ah6uav0vPB8uI9d4tVJves0WRSA6qOzaVul8iGjLbrwzwvFDj7hGZnTcQdaYc3Q3A2Hl3ES1iRA3SpnHr/KIb2DXfbQ+kTUS3xyP8DjHi9Gcj328tAKJjA4zzMrWTalc5xsipixACYDIYwwVt4hwJhBuZJF/mCfsplQnzIfN33BoT2S6VG91YhywNiF8Y8SRKkR23s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E1GjhWkLhMa++7jujXkSfWmFGN5hRjCMDDkO4SR4m/FoW0uwQ7XXK X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94f65122-0ed1-45f3-8d69-08db7ebab790 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:01.3872 (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: HzQrotGqxkUKVKsnlJ9jZ/mmPDTyjarBI77U0e9+KeUgJricGTseNxuNIus05uXW7PyiEtmIAIBJKEouLiRB3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5342 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?1770745911647902410?= X-GMAIL-MSGID: =?utf-8?q?1770745911647902410?= 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);