From patchwork Thu Aug 22 09:59:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 822071 Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11010003.outbound.protection.outlook.com [52.101.128.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF5BF17C20E; Thu, 22 Aug 2024 09:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.3 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724319859; cv=fail; b=iwm9adnsc9YLp3Z4AWcsghMbUlz35LsvaH7XleLWUlWLR4KAZM/oooYphMJeUNVrwe14k7x0I9w0nWuFgq8PGz362k8qUenfOuIctHoitSog2xYnXA5i7VKmxTldHEISrTHBhcFxEA0BGQCUvVRKgwC+FSggvnML13L7TKE7lDI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724319859; c=relaxed/simple; bh=WEQfA48oLE55+pZ55CSwKWYzWCY8ZHledGhxG9ZdVFE=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=PSgK/nZFtyuHFgzC5M5g80ufqTT7+hI1Bx80bBhLwKdQA3xX6GfGJDZzCQqJJ33hc0BU5sYkr+8p963pvFZPdcQTcqR3KdQ9xKWSz8fIXw+IST+oY+gWbB5RbSSHaniYr5fPKj8xDWSL+m5n5l9WC45xDIwL+L7oam3u4DWw2bo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=ogoNV6xN; arc=fail smtp.client-ip=52.101.128.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="ogoNV6xN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ArorOc211oyO6TQtk0CM7Am1UaKLdmr58yYZ1ygN3UvJaxWRh5zBE9JiTu2MoAHyRokB0GWvcW0USmTV9mQ7tkS0FkA2PDCDMxiWNoN59EdnwL/0rh/e6zuKdpSFeqd5ukOdbuOeuwZGKx+EG7wF1G9jcgjpxYi/gdDs/dDCV3pDsI8YLloEo8+oxW/jovBr9H/TKiU+lDRLctzuuP4pJ9WLeOe2P7wkXL4NNWbktRzGP5u8XmTZkNOhu/zwi26cU5npgqtLuyN4bK7NllcVuMJhfFSvzt7rO98iEZQr9QazM1dOaahZvOV01tkOmE2nTrL9hsaG5MYnH6PVx0lM0w== 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=CCs4cUO+FnPpFNr90feC2GCznaYbsGPqupsQA81Df6s=; b=v/w35PRnHAMQjiUVf3yiQeR3n74g7MbWysZHzkn4ub1PsRN764+yIebZ1BGmt8C456uY7hVCeb6aHnaGlJHDlh2oJqxlZyt4x2GrSuNYm2+BPQlZttm1Vy8SbZK0/LNoAk1cfufgdVuMm+znfeCO9MzWDmvu0UY9DG2x5PG8T9jUnDJ8N9/RHpvBH5dP/7jRUUUFc+J/voiSAXxMZDq7lFAuhkcOkmS5WWCLaLICnNivKbRF58p+CVb9aY2BdTRWJ0HKSAtHwG8y42jnmE5NeAYE7Sy3l2gHGWe7cQmejzbTaqVSMNgLIo64DObvwJj2FRtdkq9X+51ffqqcABMsrQ== 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=CCs4cUO+FnPpFNr90feC2GCznaYbsGPqupsQA81Df6s=; b=ogoNV6xN+8NBmzA/FT2iF9+66wuGQDpiulzYc3fevJCShNg3KioCFrBgbcvXm7aPFOLkR23cmWwxDOmrGJOezvFI8Xmti4ZIN1OKkqzbsF+XPnUfLbpUaj9QZ29U9mXDG8k+AmUXnJxPbU3M1q6QBSJ3VqJuFe5D3hDMq59TChFnb5Fps9cwcXzvz6oxijB3BX2RW986L4ll2hsG8KSZYxCPm6XDGE9FGSqlU2/eC6UWJVhFGhiK0MJaGxfDIg7gUU2IGvzBLCE6tksyIKfjmfnf67xPT7IHrs2xuYCqh6rHLaNQh3PdT3JVgPfJzx8xPtN0x9kls5eproqjJ7A4pA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from PSAPR06MB4486.apcprd06.prod.outlook.com (2603:1096:301:89::11) by TYZPR06MB7315.apcprd06.prod.outlook.com (2603:1096:405:a5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.19; Thu, 22 Aug 2024 09:44:14 +0000 Received: from PSAPR06MB4486.apcprd06.prod.outlook.com ([fe80::43cb:1332:afef:81e5]) by PSAPR06MB4486.apcprd06.prod.outlook.com ([fe80::43cb:1332:afef:81e5%6]) with mapi id 15.20.7875.019; Thu, 22 Aug 2024 09:44:14 +0000 From: Wu Bo To: linux-arm-kernel@lists.infradead.org Cc: Nishanth Menon , Santosh Shilimkar , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Wu Bo , Wu Bo Subject: [PATCH] soc: ti: smartreflex: change to use devm_clk_get_prepared() helpers Date: Thu, 22 Aug 2024 03:59:11 -0600 Message-Id: <20240822095911.1644729-1-bo.wu@vivo.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG2PR01CA0176.apcprd01.prod.exchangelabs.com (2603:1096:4:28::32) To PSAPR06MB4486.apcprd06.prod.outlook.com (2603:1096:301:89::11) Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAPR06MB4486:EE_|TYZPR06MB7315:EE_ X-MS-Office365-Filtering-Correlation-Id: a187c96e-8515-43b0-6753-08dcc28efb65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: I4z/2e+fCNhZA+aCTWmzF2gJu+wzFzmjLGh2R0eqrrhfmBE4VfzXE1c6nQxF49plPCTiHCd2+odIJ4f2Y4UndvhpSP5ToU/RrRp5BuBx5IvAkv0PKLGrzQxzVPLM9exzZkDIdZPsLRfIyseLXsUbg3HGlqbREYwxHb/1EP/OO4Cs0Xg6in6OdBVJUkVHm+l+1Vu2lgM3WO53lmgZxFr4roIEjAlaCs/oQtt0MrryEH0qaO4wew/DSQMiXEtW8m5NkRqyN//ftByRyL/mJXEu9drWHHPXIiK/8DOwqMY8YiuZ82SSoAM5jO3dqUDyj3qPywgbdXpKCODysrlUyhFhXgLZjGlEihbTagj3XgavSLgmdLDJY7E+X4ovGGIzw7F63StCXYMdgEudZG0coo+QLq5p7tDPRydGD7ye2aE8uuzFbsVQAShSe7XuWoN5z4TVdYed+1y8ToazQcqQ6KNIvONb68AlqMEFrwtMfCkUR2bn9+tPaUiTa2nTlFwH3V8expYuDh7ikji3UOlvsLT8zQuFXAW1Havzm9q7WC2BFweBj9LoFQTvxjTxWuprFzgoTBp7yKDpN31xxVwevKXhMkTRUE+CkmGq8YYGtkAGQcxXRz8Faz155cLQl+ZtxnN3h66kICnx73t3KKRcegQmCaoY+N4kv46hzOaJSlpr0vVXXlYoBSXz0LbmKX2/Dxtr7Im7Kna3DrZxUMepcPpBGEV/QXZYPHgS7n0reA2bZjE4ByQOVzusKiImX1Tw/BsJg4aUcq9blCVdEX2Brz9jXqPcgzLUGO403zpP0fmUoGB94DvjPWYz4XAoggRIZs0bGDLR6/R6Zs5zR+PeZKVWelb4p2WgvjJtedi2c+lPmzignnxsMnSPK6XRCOEhqYRoZYVf5NK68XGbA92/HrtOcgmRfs+kAa/Nd3dUvF+sYl4db6BvsrP2/VI68cAsV/oJmKf87ZTjJlDR1Sx8jJ6jE8YUWOyWbMOoQHjGeGS7TL5KYn7PYjAxZlIUbm8Lh9M/Eox6bM58PrdxbAalaOYfIRqpB7sQg2X+2i2HyXXzASm96im1yvNdnA+WPSE8dUqhDCophHCSqKJiS8XLgBXQWSkW1EXlEIP6Y2WZn40W7uVqnLVQPbN1lDqZdIXO6obH8Mob+DjaH+cHGGYBcM2vQ0q6hsMfWdU2/JSFSoxjutF6fVqMwSesA0nULu8AI8QxDMBqBtKtXeAg1UOu9qITpPwpyLeqGFKvKoZyDyAOnaEoNJgNJkehW98PJf8O6zem32Y3np6wakEEj5rfnBkMj1f+5acC6eelABGYCdzgCFJnLiLgMg/uZNx9uYyWn8LhAMkarg4WtABQsBuz+bOb8DCA5+uxbR8lXlIK/SSU+6sAZpiOcguXOzFnr6LBU//85m6HEoxQ03lGp4WVaZzQNg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PSAPR06MB4486.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam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yKZR/kaiTfsC6GqyThL9H56UwxMYCnpImTxeCiSo+gatz1Z5hF5qolvSktqVaJLOAMDnsZKZSlX7fTeMBvjr5EgyxP4CFi7g/NWrQepQkHGo+VXRwVmGKpiXSRBe3BfrGKWAjNB8eWqaCHPo4bfpKTP0T8VioMCPtXshjUycb5Tw9PFSfVmipZfKVKtYcorCILB2E1BmJDiUQVJ129RXtQYikR/ew7cDsrDFu5atvf24pNxY6X4R5Kbw/3fJObwHyRGT5G6jX5AN0zZGySESmFeK2TWwEmloSqaSfC2cQh3UblHX96DTRaJ5jUowQo1DF5uMI8U6hTjy+RkdhO+swCGNjSWYgJESlxcVvhzjSRi4vJisYbTBv78ROfCDMWWiM6XugY5c3uXoFH8mm2Q+cdkAQeLYzkl82a8oWvq/V8UFLrJvw8oFCKbTp4liTnHP3NoxALsgFBOsuS6y9jDH6vL4/pPe1r3vF/sxYQYfQdidZ6colNEoRKT7i0uqWyGhDjLRGkF4gIZW0gDKQsuEwdXQclE38cG7k9swZa4q/saqoreJ+71 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a187c96e-8515-43b0-6753-08dcc28efb65 X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB4486.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 09:44:14.1045 (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: TQEAs5WmjTsGst8MJGEXsZJi72sIvZxrJdiUXCZNmce6aw77g+l0t+Fp4FiAIremGBvf7wRcdSsQrV6UW/SpCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB7315 Make the code cleaner and avoid call clk_unprepare() Signed-off-by: Wu Bo --- drivers/soc/ti/smartreflex.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c index d6219060b616..103ea0ae7661 100644 --- a/drivers/soc/ti/smartreflex.c +++ b/drivers/soc/ti/smartreflex.c @@ -844,10 +844,9 @@ static int omap_sr_probe(struct platform_device *pdev) if (ret > 0) sr_info->irq = ret; - sr_info->fck = devm_clk_get(pdev->dev.parent, "fck"); + sr_info->fck = devm_clk_get_prepared(pdev->dev.parent, "fck"); if (IS_ERR(sr_info->fck)) return PTR_ERR(sr_info->fck); - clk_prepare(sr_info->fck); pm_runtime_enable(&pdev->dev); @@ -928,7 +927,6 @@ static int omap_sr_probe(struct platform_device *pdev) err_list_del: pm_runtime_disable(&pdev->dev); list_del(&sr_info->node); - clk_unprepare(sr_info->fck); return ret; } @@ -943,7 +941,6 @@ static void omap_sr_remove(struct platform_device *pdev) debugfs_remove_recursive(sr_info->dbg_dir); pm_runtime_disable(dev); - clk_unprepare(sr_info->fck); list_del(&sr_info->node); }