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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1579601001-5711-4-git-send-email-claudiu.beznea@microchip.com>
Date:   Tue, 21 Jan 2020 10:03:30 +0000
From:   <Claudiu.Beznea@...rochip.com>
To:     <sre@...nel.org>, <Nicolas.Ferre@...rochip.com>,
        <alexandre.belloni@...tlin.com>, <Ludovic.Desroches@...rochip.com>
CC:     <linux-pm@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <Claudiu.Beznea@...rochip.com>
Subject: [PATCH 03/15] power: reset: at91-reset: add sclk to struct at91_reset

Add sclk to struct at91_reset.

Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
---
 drivers/power/reset/at91-reset.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
index 999d3a1653d2..1bc39bfda0aa 100644
--- a/drivers/power/reset/at91-reset.c
+++ b/drivers/power/reset/at91-reset.c
@@ -52,12 +52,11 @@ enum reset_type {
 struct at91_reset {
 	void __iomem *rstc_base;
 	void __iomem *ramc_base[2];
+	struct clk *sclk;
 };
 
 static struct at91_reset reset;
 
-static struct clk *sclk;
-
 /*
 * unless the SDRAM is cleanly shutdown before we hit the
 * reset register it can be left driving the data bus and
@@ -238,11 +237,11 @@ static int __init at91_reset_probe(struct platform_device *pdev)
 	match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
 	at91_restart_nb.notifier_call = match->data;
 
-	sclk = devm_clk_get(&pdev->dev, NULL);
-	if (IS_ERR(sclk))
-		return PTR_ERR(sclk);
+	reset.sclk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(reset.sclk))
+		return PTR_ERR(reset.sclk);
 
-	ret = clk_prepare_enable(sclk);
+	ret = clk_prepare_enable(reset.sclk);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not enable slow clock\n");
 		return ret;
@@ -250,7 +249,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
 
 	ret = register_restart_handler(&at91_restart_nb);
 	if (ret) {
-		clk_disable_unprepare(sclk);
+		clk_disable_unprepare(reset.sclk);
 		return ret;
 	}
 
@@ -262,7 +261,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
 static int __exit at91_reset_remove(struct platform_device *pdev)
 {
 	unregister_restart_handler(&at91_restart_nb);
-	clk_disable_unprepare(sclk);
+	clk_disable_unprepare(reset.sclk);
 
 	return 0;
 }
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ