lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240822095911.1644729-1-bo.wu@vivo.com>
Date: Thu, 22 Aug 2024 03:59:11 -0600
From: Wu Bo <bo.wu@...o.com>
To: linux-arm-kernel@...ts.infradead.org
Cc: Nishanth Menon <nm@...com>,
	Santosh Shilimkar <ssantosh@...nel.org>,
	linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Wu Bo <wubo.oduw@...il.com>,
	Wu Bo <bo.wu@...o.com>
Subject: [PATCH] soc: ti: smartreflex: change to use devm_clk_get_prepared() helpers

Make the code cleaner and avoid call clk_unprepare()

Signed-off-by: Wu Bo <bo.wu@...o.com>
---
 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);
 }
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ