Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31559529rwd; Fri, 7 Jul 2023 00:47:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6hAvaZlnEZjH2NMOlIT/T8frsFEi4BlScK1TKO1iVjHsAd+WzU+5L52PeCpO0cd/6Aoq8 X-Received: by 2002:a05:6358:419c:b0:12b:df63:9d64 with SMTP id w28-20020a056358419c00b0012bdf639d64mr5817794rwc.19.1688716042842; Fri, 07 Jul 2023 00:47:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688716042; cv=pass; d=google.com; s=arc-20160816; b=nb5npMhYaxqbHq5xtJJQuMePyyilCBKSP6/Fu1w4mzu1mSeI5xajajLNgkptDgc02G uB1l7xcS3Rhge/q9n0wyDoDikeWwYRjdF1W8HFiAS/uj5/DAHDCowqx3WFOflJTJ2w+E 6gbrWtKimfLz9QNe91G6HkpPs3vZM+Bu96eurqjoGBsZZJ/EKaCmdo2pDsB5TsIwohOD ubzgdtAFm48DHjH3rb2fc0T78m1zFxUk4g82qQZ3ZPzD7e9OTHBfbVRDZeFHJ0vDQkTQ vg8s0pjBB+nPmq0QeaT/2ycjivVtnDoJRi3vZJtUHugmWHUwVMKQeaNGPfyx9Jux6WbR BAjQ== 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=B+UVYT/rqgG5zKmArlTCtLu7jKlSTrIahzylYaJ8ZGU=; fh=/TUKuXtSihbRKCahUhP0s3Kp7RuFd2daguP3vCYpJUM=; b=U2RSwZL1oTi+CpmgvWT7lTJX3uRm1HkkNuIsuWL7Sa3GdqZnk9v3p4VqQT1JsYTaC6 Dtl6Qndgu6PQlCQbR4remMTjsD3iBNm8zTLzitQhrnfFMNQp5YoHpg37OR2dhreu2W9B EHHwIndjyHyDT41PSdWKK6q72UbAQjxu50QENoA9182fbwnUDhSrKnH6V6vsZZEIvC5H qu5H05lIOg3wMQ0baiF1OLYsAwDbsL6zDH7q6S7u/UFmgsGLmyuZwy0+sTEehntQBEIQ 5TcNliaZ5HDQxRWolP3DJ2uCp+oIal/aSZKxsPCp7Hd5zPvlVw57F9gZ+UBwiYNTQijD Uuuw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LCwvKVPX; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l62-20020a638841000000b00543d0bf8632si3289273pgd.866.2023.07.07.00.47.09; Fri, 07 Jul 2023 00:47:22 -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=LCwvKVPX; 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 S232548AbjGGHXX (ORCPT + 99 others); Fri, 7 Jul 2023 03:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232513AbjGGHXO (ORCPT ); Fri, 7 Jul 2023 03:23:14 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2116.outbound.protection.outlook.com [40.107.255.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A5F1269F for ; Fri, 7 Jul 2023 00:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WkuKsaw4t9RfTCTlfXfQ2K0ZoZSP2Q/OO86jgMFjz5YHIVOWSxCd9Uz7S8M/6Cvpec/Ll8w9fkwZhMnGrrYe4bNLfTaUpPd+7CDBISUbfrGM5YKGGhqCNYi1OtQb2IuD4+pbQMrmkbPM1K4C1u7kh5gFRPUoDqc8HTkj/iyp+AoTOtgq7bmkFVaIFMuJcq6Zrz036bsJVBHtKxdBz9H69SZaKtopK6KO9U48cnJzbQJboDt0YCr7N8nLjQ7QwC8itbLVQ5VzLnihKC4clFgblFlF6V/plhvLINkAySCvMluZlcEgL4NWHmLpTF5sswLCVDzq5vD3RJIhCHXegIHbpQ== 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=B+UVYT/rqgG5zKmArlTCtLu7jKlSTrIahzylYaJ8ZGU=; b=Alv4XPT1riPg3QklmntaPsjJmPfvd999tSEp1ubMQz3Po/XT1+OGyjL894GZNyrMMToAg0BwixYQp1Q2y50NPT+yIYWgwKdZXuvpwcLVfAH4J9gr2sbUgS9CUJ+KE815HHUt55kBzfOHpCHYfd6b0PXuQo/EmBlxpiM/bKceSc9SwYbu+bJbnT1gw5hnS1qFIroOxVWQNzvpcGZVuGz5uyAKWcq4TPvz0XWHkvipM6Yp72JpXCbVmHO5elbuKAmc0t8TkgWYxH3uyiFXoIptBqcDKJ/DuoE9nDb0rwmYSzupOw3pQ3L9t+fOyjye37kUL+W5HpqBNpMV6YffcMCIgA== 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=B+UVYT/rqgG5zKmArlTCtLu7jKlSTrIahzylYaJ8ZGU=; b=LCwvKVPX0XMxYX81rjOJHkTU4krXJ561h89qbKKejO2IhQGvR7T+BhhV7h6Dk/RiaircyNTxDCmPXJrqW601OX2LPgqVdgCe+LPi9/MZYK0wY9Is6885DbNcIi3V33w4rDr9zMbScruM6x11C2cRVN6NOiHTbdfd6q3d9qa9ABsbhYnNtdfxWzYqnLopIpR5q1scEK73N1B1qVYmYv/dU1O8ZWJHY3x51mGFI3Txc06Zm7hhItSsSJpH7Y1KBi6hNpe0eGp+nGgYOOxT/yg8NeZvk6xWMeL3S4Ie5M5nQUZKF1nMkNafw+WVgJ4o4uIjz9f7kd6/PgU37Ht22liAmQ== 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:22 +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:22 +0000 From: Yangtao Li To: Yannick Fertre , Raphael Gallais-Pou , Philippe Cornu , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/18] drm/stm: ltdc: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:29 +0800 Message-Id: <20230707072034.48977-13-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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: 1e037f68-9cad-4e1c-3271-08db7ebac43f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NKCRamd1pNDC9dwTnXeVtjtxM6cUJNdoLOS3eOAkQjuae0kFYE4YGAawegOPBncabX1JfaemzcOwvGDur3S00uZLL8jkx3I9614uSN8HndHFJQeaUlLJZBwgsPQmMBym629tjs2Vk5aBau7qE6z5zHTFztSBRBT9/b+F1FPL3evt8UapY9klTp0ZGF+9mJrfrX5i8QZWw2UrusAEh4cGbvWE71dHCb7e24uUf9lZH7jztihYe1CSNHgSmoPoE4W8blq8vr0pFmcabAEG9SWjZLTuAZI9JX/JQ2jPruFf/e/rDsVozvz3nN91MgzOJ+wv/OPBrYACvjAojeBW/PlwKtxr5CqCbQSpUQx0zrpcsZrhs78RWmZ2QGNQOZs5SyBijRHU3bVy1NRSxIcNIDvbI9pGuRqJt1xTQWWBVKWqOUWRr5O20Zv6Ce7DiFdUoYxx7X0luNtMDYsYEtVv56xGfBKCU3rYxSuHWj1F9BlpoyZDnU3WrcUzQOtfHn0J5AiKa9K8CeoxRdqHBw9kKSIofqcbh1SsSuQBb7BEyMzdO8L/Y40b/LMxl3ruE2uaSz4PdsPaLbmrs7KzB6eZsLZjEAJ5ShBLw4GYjW7cIjQdXPZDoaCE5zeqtXf2VjBaiWkv 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)(7416002)(5660300002)(6486002)(52116002)(2906002)(41300700001)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8+XwPCFZ9xlFzdTvqiXh8PG8CZp5zEtoSlj+VrdVEVbKJ2ep2DEAz1zJu7Kk?= =?us-ascii?Q?kGtS5pklG+GsuewqyXSwKYdoVILR83OYsEqIdn7KwiQFyOlJHGz67tzgfwXG?= =?us-ascii?Q?kVhq6MhUEi8BaXtZ4tHYn2eU0piBBziPGvLp5XgAvyAVp983Ae/iDNUFfw1I?= =?us-ascii?Q?Vn1fF8S6v5rbkQ+HEquGpcYWtHhUKKY6EM7okOkvZUBbZh0IYuwgpp6+OMnA?= =?us-ascii?Q?tIDftlMO7qxFQ5V3a3dGyTWsOkjRlfOJWfvGbZNkm1ZZWmGJb2kCd29q4pr9?= =?us-ascii?Q?S/1rQdcBC82KLwS/+kHQlu2mdQ2b5Fkiofaoc9m+T2CKE3R8XvfHHnEaLiO3?= =?us-ascii?Q?LWat7Z5kPHm5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ii?Q?6BuJYXHQMn0gBbxJP/XucLZNByUq4KEG5Uwao0Rrv6bfeUKLuSjU6NULVEEc?= =?us-ascii?Q?lWpaxGr5odCRF7jWsWfQ6WnW2pHczsRidNUsTVj7lXCcJBZonaXM/uk2JV67?= =?us-ascii?Q?qtPaPUu2JKyowloF3w+e28lK3gowLzj0p36pZ+dczoWLP8UlQGPzr09rQqIl?= =?us-ascii?Q?tUeZubx5WgVh8YtW9zBBzLv3EtITqx4RZZlJXEY7sxDEYhAkuPg2/XIUrgGb?= =?us-ascii?Q?NYUgGMqz9iM3Zzy9j0CEo1fnh9ZyxO3ZWJd9o1faL5VLNjJfAeTjGp5yxib0?= =?us-ascii?Q?Asr/9XtTjE0RGGGCVqU693LRbEgOCehTwqIcBj+B?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e037f68-9cad-4e1c-3271-08db7ebac43f 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:22.6650 (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: A9I/S8EYVEs9um+QnfghzN6ztuMNH4IWWhU1SDik08pfnHw9kWS9LYU2OV3gP8m7RsWzBLFCVHc25wW8lml8mQ== 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/gpu/drm/stm/ltdc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index b8be4c1db423..734dca4d7dd8 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -1925,7 +1925,6 @@ int ltdc_load(struct drm_device *ddev) struct drm_panel *panel; struct drm_crtc *crtc; struct reset_control *rstc; - struct resource *res; int irq, i, nb_endpoints; int ret = -ENODEV; @@ -1992,8 +1991,7 @@ int ltdc_load(struct drm_device *ddev) reset_control_deassert(rstc); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ldev->regs = devm_ioremap_resource(dev, res); + ldev->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ldev->regs)) { DRM_ERROR("Unable to get ltdc registers\n"); ret = PTR_ERR(ldev->regs); -- 2.39.0