From patchwork Fri Aug 23 10:17:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunhai Guo X-Patchwork-Id: 13775633 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D9BCAC52D7C for ; Fri, 23 Aug 2024 17:39:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 19F0510EC97; Fri, 23 Aug 2024 17:39:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="Hv/jKEvg"; dkim-atps=neutral Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2053.outbound.protection.outlook.com [40.107.255.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FD8910E45F for ; Fri, 23 Aug 2024 10:02:44 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=STqf6POCfLAzy/P81SObHfTzL9TOTE8o/vAgt4FnXsxaLfCWaloRhm3phsYyTh3E0tnb8k78YW5JVSuxrR7rqlQ/qeo5xLBxWr1fvY9efzSpLAW6ZXQD7gRUDzn7nEd+T1kRriqh4G2I7TE1t1OEr799KKSsEMeKaoFv61rwr09wJjKSGlzyKSgvaY994Xk+B/bR/fnL5mYVcFyXdHLx8C1bzfendlfu7Fzz+7azADYTDfSE2JM9ZfYucsEqPxemQD+XVq/jv1umPKogVy6CrBS4EElFsiA2rnnNo+xoFAFUchsjAuc698WnRnfQBrBhSBCa+2lOdE1RbSuCaZBOZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=HyRMXxtRAusDDxAqwEfoylIRLh2FgMA0HoKYMuW3n+U=; b=VW2Ms1Pkug5XkkfZmahX3lG71Z/8+qIbm/fwq2JozkIuRpcNxdJKmJEeL4INgwQj0pgCTq0ZFfu9PG5MNR4mRE3rGb0PfYW5jsKYjIRtFFNt/g5DcKFjo/S2vikzpPZIxcDmj9DFAECMDB916WUlcJONU0z3zulhnnhm4qdxOZ8jqvl2FfF6z59OV8YuRsRjO3VcxxMIQRoZ0oafBTe8iCsglrjQlGygWaGuQRnjHKyOxJfzUeCm7mpuHOGrh7Ltkkvj62IPHZdRsN9ICXQEUdNiSOrWF/MyrrMPKy3Nx8ShHjPq5qYvmI8QgmNdrzevB0Cg00qGJDwbgziyC2ftLQ== 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=HyRMXxtRAusDDxAqwEfoylIRLh2FgMA0HoKYMuW3n+U=; b=Hv/jKEvgEhi0T6Vx4DeBZlJ5GQwghPgkWXrfzcSCpKbpIGHuNpXV6DMvsjPmlJUXcT4rzoaJOaXQOj4GzdblidyZEq0SeCJ7bXdTsMEvEadlTwllRS0fAKNhH226aiLstGOhSMGz6pxFJtpHCkXBO9Q8AW933rdEry39qx1lhjBG9GZJclUw1Fcx4oaWaqyaaAEgoPF3B2HavqglDKFEce0NRYTJQZ/HWDnTpvjet9Uwal2KCgz2PWu5AIiZyGeUbrf0xQ4T4qfTHyLPkqW5b7UuWG4VQXR2OzUVH+Fjpy3QyfFqAiPnrqhwP+wkVFYOji7fumiteH4/u3x8kS2dmw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB7096.apcprd06.prod.outlook.com (2603:1096:405:b5::13) by TY0PR06MB5281.apcprd06.prod.outlook.com (2603:1096:400:206::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.19; Fri, 23 Aug 2024 10:02:40 +0000 Received: from TYZPR06MB7096.apcprd06.prod.outlook.com ([fe80::6c3a:9f76:c4a5:c2b]) by TYZPR06MB7096.apcprd06.prod.outlook.com ([fe80::6c3a:9f76:c4a5:c2b%5]) with mapi id 15.20.7897.014; Fri, 23 Aug 2024 10:02:39 +0000 From: Chunhai Guo To: joel@jms.id.au, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch Cc: andrew@codeconstruct.com.au, linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, Chunhai Guo Subject: [PATCH] drm/aspeed: use devm_clk_get_enabled() helpers Date: Fri, 23 Aug 2024 04:17:32 -0600 Message-Id: <20240823101732.2180381-1-guochunhai@vivo.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG3P274CA0019.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::31) To TYZPR06MB7096.apcprd06.prod.outlook.com (2603:1096:405:b5::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB7096:EE_|TY0PR06MB5281:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d718902-5a6c-4c3d-5231-08dcc35ab8f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-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lRaSieYXBzhiKml4t8oB7IiuslBDyIn2naXaAqZ3wqeIw8krgYouXpOMvLIcqI4DCLYya+qgvRfH3+KrU/7yy84gU12HsdJpAU+JL8tzpa541xBAc323EHkfk8JfujhZBX0QPO/bqriDXCfukMBWkErOt3EDXfeOAdYbfxJ5hWAaHwXgV1D/eeqBNo0698camBaqT1lG408jK5oXwFsh/Pq9+MPe8nWRJsWfFC6CReBvkZ+XErJPjHfbfa588l3DH8RrQd79Kk/7U71xDrg6wNV/aOlRzxAGkweAko3JkdjIq0MtWGoCBMYUsumAS8MLH+AEW0yPrRqmlnE8PYw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR06MB7096.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BqZLowX8knXJzYRaaHjIcXr8VuGYLuwo8ti+fF7XrPdbI6dy8wS1V8QSsKk0EhDdW4yDoQAKoFh9nMOpXamWNnBIjBm3eiJLVRMIFw9Y+amM3DDlDPFgIKVbQDKP7Em5Op+vPQY/UkRUNc7lgjTIlpQ6H9+wSCw5KsylLFogvfA29clI0vUxgjEl962MmuH8Z1r70Fn47GwyP0ZrMu5Y2m6e3OsBW/JJTSqSfUKaPwEm2CRfwztGFTDYjrLJu0Zzr/W2j+1GN3RqgmFMx9yqhYQOxQhTtod6vfWtxaTvDYkL4m9U/chHMLpAkq1SwbGW/aakB/ysekjY5SjFUUIPnPfNPB2JBkyfWoltA0WJUSObEvMEEhvRNOUjlaff8IQIBL5XOVDiu9/83Ucn+yc8j3pq7Z/YpiiT3irPlbEIM2BKFH1pQS+Q8BMRuYY1Q04ZcbzRLO3KOxdvHh0wmgJfb0HjKAZ5PI77yCsBnW3uDHZAZEjyivU//Ptn9pKGDI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pCLdiSq X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d718902-5a6c-4c3d-5231-08dcc35ab8f1 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB7096.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 10:02:39.8982 (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: 4GCm6LL5KZ+Yf4L45/ct1VlQ5qh8UQ5cOideCmJ8a1hk5rDPjIayB2xavosPVBBiWtUfSQjGNDcdkT6hlk6uNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5281 X-Mailman-Approved-At: Fri, 23 Aug 2024 17:39:52 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Simplify the code by replacing devm_clk_get() and clk_prepare_enable() with devm_clk_get_enabled(). Signed-off-by: Chunhai Guo --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index a7a6b70220eb..7f4ef85a12a9 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -191,13 +191,12 @@ static int aspeed_gfx_load(struct drm_device *drm) } reset_control_deassert(priv->rst); - priv->clk = devm_clk_get(drm->dev, NULL); + priv->clk = devm_clk_get_enabled(drm->dev, NULL); if (IS_ERR(priv->clk)) { dev_err(&pdev->dev, "missing or invalid clk device tree entry"); return PTR_ERR(priv->clk); } - clk_prepare_enable(priv->clk); /* Sanitize control registers */ writel(0, priv->base + CRT_CTRL1);