From patchwork Fri Jul 7 07:20:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13304502 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05151EB64DA for ; Fri, 7 Jul 2023 07:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ufZ1hfd+I3e8715toEBDmJtu14aikY3ZEs7TI1bpEeQ=; b=4Za1uYQBG1WpBJ hAfGpP1HQKaBNNyUaSf/+G7vzHs5cgFn3IrgWkv6zGIYoZls4EjrDXphs4yAyU+FlYrVnDM1AViq+ g62UYZq+tVCK3IjVQSQ7AqW3ev8HwOhp5uI78ou6iifdstzqp/AYb+KQg5SbFMc80btq8AKYvim93 ckmgBxZ0Gr3UDpHiG8g/lyO5ZLSHklSOWqTNBtgsjyCEmi+06Chj6YBHk0vC8CJf/N+ornmOio337 JR4GuimnZgGa/bM3/FPJTmIU9XOFJ7h0wnuG/o3ygwFJnS0bS9wI8P7pBuWGqKlYx2xmModGNcUPT rZM/tO0/Ebbg2ZdPfvsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHfm3-003r43-1a; Fri, 07 Jul 2023 07:21:03 +0000 Received: from mail-sgaapc01on20707.outbound.protection.outlook.com ([2a01:111:f400:feab::707] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHflz-003r20-2i; Fri, 07 Jul 2023 07:21:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lCsjv7e/4dmohNc7CNFqXvZuoXtQ1U1SFsgpBYDIwr86ggZ7Ynf4EonxXufxWPO8joavUGENcGDE6T3B7PF4zDkKYtp2TRXCWt4ZKkCHZNL4omTwPLY6MRnxwd/Zj4ntxTlHg3scIe7owu2/5LyU/SphAO0eb/hhZr7TItXqiLOrXYmz7CpAGOum1IlpntKIZsuqx1dJj7UlKE+W4ZUCKkHXqSHE53hHivY9SeA5UtioCvf75+Hf8gdzK41zQlfwJxxsHA8ttYKHu93KL38oPQHAnyu3Pc921nXp1D4HD5R2J3cONwRfQcP+TZPHybQnhhMd0NudgI96av6uaKTQeQ== 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=+jehaJjYBcWJh3UI/btKH4h5bBwUKDuoQfyuspv1XyA=; b=m8w+XOjpWtiAQG2I8AMNPmtmZ1kx9CcQBkxDAsG9JAWfj2lh/hnJjfpSz9qYOyVY5kopFQgZtWmV4FNBxvcdOc0qN0K4biZSkcGgHhY+qpdEWERxUjr87fFwRM8QJmZHEKko0Fet5q9PsPrJDLqyv3U0u7nV4mLW+M+DZCNUHIyUGjOcQU20qJF2A0syz8YxBskWMpHSRt05bmPoLaU5uh7UYrm42cu/Ba9mIIjQ8QN51vrvfbYNa75x0guNZ7vL2GSfqylJ9PtAv/c9DnEHgBY9e18y2n9RFbGudc/M9mrP8Yb8+c5Z9ISlyZze1jh+rCNk2fRfzFYzPvjS3z322g== 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=+jehaJjYBcWJh3UI/btKH4h5bBwUKDuoQfyuspv1XyA=; b=C1b75g53oCnrcuswle+ke6Np22dkUZDOef1RRB0LxQgo5q24QzS9XrubC8VP5TbfaAiR57D7nY3hydn8KDi4G7qCKl5+4J9YvEEs92IXWIoZIiTqMYFM4cSndoAprpaXUOwDc2KkHaANxAHrfYzbEx5zDpdRD0X7oVxmXmopO4PW8n0NqcNQFe2UeW5WWSdr+HYmrNTGvA3Osxwh3FIJ3uDpbWIROc26yBDRNLJ1YvJJ6xve/J7CB5P+1yeJ5g6e3G8ssqGEVCuUEDHMNFzmew1pJsk8Qfpymtrgb/TGAva4gwQVrfepHftHIkV/3EHcofHvum0AeWHIh/P5+0mldA== 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 JH0PR06MB6704.apcprd06.prod.outlook.com (2603:1096:990:37::8) 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:20:49 +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:20:49 +0000 From: Yangtao Li To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , David Airlie , Daniel Vetter Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/18] drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:19 +0800 Message-Id: <20230707072034.48977-3-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_|JH0PR06MB6704:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d8e4c58-229b-42ef-232c-08db7ebab097 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H4efoazTjiPW/9Uw80GfNShkTo4RfmY2YPnZCa/fhmJw8g9fXchN9xuprtMFcu84mqZa0Aw9bDj66vSKPFDHxRYXmJxauJTFtSbzzvRv0vEhnj63NbJiuC9HpkC86H1DtTYgmt6dhmPnxAphlJwjSDrdUY29Fdg2lBiBbDcsbdIeF//p4JxX2p0ayim415ySE4m3WzeNKSjmg0VNM8bZxGLZgJUQtjVI5MNkzrlWSMP72C1snGZxEQYWMtRMAWAdzT5epNSXPXqgDigL9gh88U5XiVnEDultzXLXmYzlD8UA2sUQVjOkkTtEGvu1tfR/Nx34Qc2SwYaj68k9OvL+rZRMY/6bxNg9KnRreraaVQes3tHtLI/LdWF/HEmVQzR2de+EYbEpiGch32931iRWiuYEdiL4ikavSAGunzGyOZQL6S+eENPVTD5kqO40ilW5FmUHRHBsg6EpaIemigczAhz07kZKpkbZSWHRHXepwflGoZ2QN8Nsn4pT/CxT1Gkd4rnDVuI3iVNo5rGPuLqqfDDKoOH/RpYV6sEQIHQhi9q65UBInXN6QHxxaT7XVHYioXqQjkPMTmBaOSMGqxvbI6UK3FcUnDpZqOna3OGUGGtTjYHJyPm7ojcS5LP1OoOV 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)(136003)(396003)(366004)(39860400002)(346002)(376002)(451199021)(8936002)(8676002)(41300700001)(4744005)(2906002)(316002)(478600001)(6666004)(110136005)(6512007)(52116002)(6486002)(66946007)(66556008)(4326008)(66476007)(38350700002)(38100700002)(5660300002)(2616005)(83380400001)(186003)(86362001)(36756003)(6506007)(1076003)(26005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: z3a3J8K5/8u5gxTti7VPTYe3STyvp5AVClI7gPaxd9Od/HVeCA+uZlCWqQVNKptksGLtIQHxgi18MIy4P9mYbeVLUBIG0LscDNmkpQJDcphTtPOH/x2yNA8NWKnl6sfVfniNoLX6P85ogMCS7dNjGn4SkIJqLCT7D3mFAL1xzZnPTN4GvTQIak9sepGMBESTtZpLaiACZa5TUTq4JoCeMd4H9noZPPpH+v5ELKn+wCKRr4dEiB9s0cW0q64pvLF7TR8LFSEc58T3WZqlalzHceNghVthIX3eF9Sjowc1LOrRCk7NYVOk0pGhlA17oLgW0sUw+CFVPzq/pddpiyMlBGprPzfwqC0PX0YxfiyZOi6w+nB/ycn8o1WViWN3CekUa8i4MewUvpkoKbLzkBpuC8efGANQCSYRrm9lk9+OTP+KcO4TT0dPxoKnu8RXXskU6lT08i+/xJd6Tp6tS5GHOM9iiwPb2O7vmrzFU57o1p8F/ibUodTwndd4yqFGHYFN+WTbMLAuyWkCQvGlAUdjK/BYBngzg6mL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message-Id: 4d8e4c58-229b-42ef-232c-08db7ebab097 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:20:49.6774 (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: VT/nuP5sWpW6LNVis5bATFb7m0R99s6CgJQtMbzXatH4gOXAdVddS7nt0LcNXklN8KU5hocIJu/kunDcwgIYew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB6704 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230707_002059_882379_78147CFF X-CRM114-Status: GOOD ( 10.86 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index 917e79951aac..ab57df7c6eab 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -1351,8 +1351,7 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev) if (!dsi) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dsi->base = devm_ioremap_resource(dev, res); + dsi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(dsi->base)) { DRM_DEV_ERROR(dev, "Unable to get dsi registers\n"); return PTR_ERR(dsi->base); From patchwork Fri Jul 7 07:20:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13304503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C347C001B0 for ; Fri, 7 Jul 2023 07:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J8v4WshrGMC25d+J48IOe6QW/UmJoqFxtlP/kXYZb2Q=; b=dPDG7XOK8HgJzY qw0HWiB7ZBkVCs+7i68f+jrRq2b0eR9ExKbX8iwpqCTYfC5rYYhDxdFHdkyyYfMxZ75orhQF1kInZ naaixuc1VnZ5PPnXbXpbabs/taJy1Ja1DSGHb2vz+Aer8YurRzbxWpT/Ba1HduawYUsQNK8zGPk6n V8yRNXCli2AUlMMajOTSiyqWv6MHLZ/vTOmWtjEkbOJkyfBxKfI16+citgXpeSuXMLyjpJrNwiFWT ON93qLiv1ENrG9fdzzTxKPjjG9F3R4HZU4M8lnkDAA0qMLdAC5qaRdFsHxRTlgTJod+fATfo0/2IF wWwTd4Li0f+HwBowUpzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHfmj-003rIT-2r; Fri, 07 Jul 2023 07:21:45 +0000 Received: from mail-psaapc01on2070a.outbound.protection.outlook.com ([2a01:111:f400:feae::70a] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHfmh-003rGm-1g; Fri, 07 Jul 2023 07:21:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O41ekPv5gYaBybsIrK19cy4Q2n0i3poPjT+v0Yq6lq0f2SXIJIoJ2Fka+PHuOTzecKA1V6B016tuwFFdlDnAWuaP/fQJrh2X7Iw235PlXkVOONVl5iT6rymqIk5NSsPqJFC1bHTKx6s+o121diL6PUWRse1/73V9iTK2oTEJesky1SfeElLRQFibIRlTG9mJAJSgsLU083VwNKQcSZ0lMw/yGVtvp95JN1N1MhvYbe2IZRjs6tEIYE5+gcMIhPZ1rkjJ9eknHdnmjaIxgMqUMBbUl1V4J+0DKhMqj28Z5KJIbQS6tQ15WjiDWqQcwzj05IdVPAR5MnKzUEPpcJRpww== 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=S52aLvA9c+8fTPEUxbLQzNSXjy5oQ4nntTQZ5ZpRTG0=; b=Ebc08o0/o61jP2j1bLmBGLPhZBhZxYKxwsE4hraeJrQlnHJ5scN6esY0adcNegUB/+ulP0i2jXepAXpK35PI5TFtM4GGsqpO7sCN4m1Og9/8y+gJ0t5XJojRQ6MkX53eph+O93lnAhuX7HrWayyiTLgj1kSvKfx62uQivgEZ8Tajm14UVaiMNQBTUorOlFAbhJt4m/ShuOOFvSrQl6rkz58qSLn4LNGJa19RqeBwfteRfk6YKK2gy0nFOSfN4C6xRbWar+xHdV9+EraCd0g4GkFHBZOpTu7BF+ADKFKE858zUr0Pc4dlMEm4xQVbliDlDOoGGgRmBAvbN8iGGn4bnQ== 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=S52aLvA9c+8fTPEUxbLQzNSXjy5oQ4nntTQZ5ZpRTG0=; b=PU3AIPVycqc6QK0em2JCfI/UpR4zNS1tsvJpFizKCYKy+qtO2210GhKXeYUvOfx+G6fDUx81QuB31/HDOsh7EcE90KrZMtqPH0Uz33VM80NMgagRgR7jOLwYKWxTYbG+isupbmp19kbO2NzpXr7JkU67WcmX0qvug3sb0+e6Sq1PctkfvYCCmiKg8+eLbTt48tMDFRVMrgA0L/cYwNt89yfwEWUu5+B/Onokiwgw/K6P0DxANLquwxVTc50b81D1gksbkgWSGJwpnrIAuaF60shwpNb4pb6qtexOTgH/L1vErlez+pn+nPT0k7DAkIJM3EKnWbEo8hvrmOdvzxwnFA== 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:38 +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:38 +0000 From: Yangtao Li To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , David Airlie , Daniel Vetter Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/18] drm/rockchip: vop: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:32 +0800 Message-Id: <20230707072034.48977-16-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: 36f4f6b9-c1b0-486f-4177-08db7ebacd5f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BNVXHi5cduDW79aOljdeH5wQsXE//YVaQ+rQOlbazF/PU/TsRrhLnF2/HtJJcTNK66AI8tyNOoaj1fTD7IG8EPtQ5fDvvXRge2mWpA7GWXmSXspaZAkGSeRHuSazfhBaX4cNqZ1huulegfWxsb6voRp7oKFLwBeXuUwzubnGpzrvNODFuaGv38gF77Qw0HjoSaf+0UgBRPy80wJ7gq5ITynrX19jjGZDT5AlC1me/gU+yi/Jc1Lh2bvceltj8w4x7GY6QZ1zXa1w6jSGPNuDs7Nfb1k7EIBHrupsfcnlJRjBKeY48JQM9N/L/JqUUV99x6QXc9+DDRXEwOzN1Men4h+n+KTcSDk/XtYghx/87k7fbNPn1yeiSvCLZLdp5hY9/e1JuMuWQEWFCu6JJ/xwb2AjOaunyT0mEflCtf3bqRkhhj7cWjQQJybaAB4EZ76r61mjJHYL4K38YH5P/ijtWdKDL/+zsJzNYFAfNqGBKMuZ75nGf8rQZcr3+3j9JZzca5UyAbtZiudK5XEabetqNyqQXcl7HqWRVxG052/qz7KS1qofnPMzEuOcJ7SUNYA/mHDnbp6bKn10BIzLr1PHbVyunoE9APnpQ89cM1O2MprGBXtsK4C5QII2rLw1U6Zp 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)(6666004)(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: WD0+mZ2Pk+UyIePG7LOy2lhQzgGPSN/YYj7EVsAilGGqLCV0g/WR7KHvl2Bn9LrxSj1NMl9cefHW0SSfYqy+2hjn/2Vk68tDo8eNI40+5ns6XHpNzQJCzWOhc1BDosroV7PM6pdcKefOYPU1B5TWOQhiijSdrMXLxhQuvhefsIY1YxLxo46v8ou0IT/b51TkhOHtTRC7559AtmCmqaN82n5BPhSLRGrHsgu5hEtk54tmpEjvaIp/hsH8pv9BB3baJ9zRNhVSUWN1dsv48iK7d61fRAr2ReZS4tSM59OS9f6f8fFvsj3xBFTT3E/UGCJwtpa6mk9g+9Eb5eoESXPScbBOAz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swoL+1e1TU6ZuXpclJeQXLy5l9z9RQKJBiEmnl5ZxbwjTV6eq4JNFVUACB9X5/ggyHJIx3y+71NhteOpwMvM0tPYdRNEfpQi+jx58q8Gps7rdnvnRYD/n3jVxv/QSlQx1ayvejBs76wIWq3sAQRZwRRidkwXd5JuNyvDitIAtmwSLmo X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36f4f6b9-c1b0-486f-4177-08db7ebacd5f 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:37.9712 (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: W4aX+8CUHD+0bPDoIWuGPhc1dVRUXoefo5AxmZFKjOOXA1RUK0kZhBANIKRfmAhtFfYPtEi0i3uTEYwnQIvA0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB3954 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230707_002143_568443_E2FBAF46 X-CRM114-Status: GOOD ( 10.15 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index a530ecc4d207..e95d94ce1869 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -2179,8 +2179,7 @@ static int vop_bind(struct device *dev, struct device *master, void *data) vop_win_init(vop); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - vop->regs = devm_ioremap_resource(dev, res); + vop->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(vop->regs)) return PTR_ERR(vop->regs); vop->len = resource_size(res);