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>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 May 2012 20:14:44 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	kernel@...gutronix.de
Cc:	shawn.guo@...escale.com,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH 03/15] hw_random: mxc-rnga: Use clk_prepare_enable/clk_disable_unprepare

From: Fabio Estevam <fabio.estevam@...escale.com>

Prepare the clock before enabling it.

Cc: Herbert Xu <herbert@...dor.apana.org.au>
Cc: <linux-kernel@...r.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
 drivers/char/hw_random/mxc-rnga.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
index 187c6be..6f20f56 100644
--- a/drivers/char/hw_random/mxc-rnga.c
+++ b/drivers/char/hw_random/mxc-rnga.c
@@ -154,7 +154,7 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
 		goto out;
 	}
 
-	clk_enable(clk);
+	clk_prepare_enable(clk);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res) {
@@ -196,7 +196,7 @@ err_ioremap:
 	release_mem_region(res->start, resource_size(res));
 
 err_region:
-	clk_disable(clk);
+	clk_disable_unprepare(clk);
 	clk_put(clk);
 
 out:
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ