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  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, 22 May 2020 10:19:55 +0800
From:   Anson Huang <Anson.Huang@....com>
To:     a.zummo@...ertech.it, alexandre.belloni@...tlin.com,
        linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Linux-imx@....com
Subject: [PATCH 1/2] rtc: snvs: Make SNVS clock always prepared

In IRQ handler, ONLY clock enable/disable is called due to
clock prepare can NOT be called in interrupt context, but
clock enable/disable will return failure if prepare count
is 0, to fix this issue, just make SNVS clock always prepared
there, the SNVS clock has no prepare function implemented,
so it won't impact anything.

Signed-off-by: Anson Huang <Anson.Huang@....com>
---
 drivers/rtc/rtc-snvs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index 35ee08a..b9371f4 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -362,7 +362,7 @@ static int __maybe_unused snvs_rtc_suspend_noirq(struct device *dev)
 	struct snvs_rtc_data *data = dev_get_drvdata(dev);
 
 	if (data->clk)
-		clk_disable_unprepare(data->clk);
+		clk_disable(data->clk);
 
 	return 0;
 }
@@ -372,7 +372,7 @@ static int __maybe_unused snvs_rtc_resume_noirq(struct device *dev)
 	struct snvs_rtc_data *data = dev_get_drvdata(dev);
 
 	if (data->clk)
-		return clk_prepare_enable(data->clk);
+		return clk_enable(data->clk);
 
 	return 0;
 }
-- 
2.7.4

Powered by blists - more mailing lists