diff mbox

clk: fix phase reported being zero

Message ID 20180215101958.22676-1-jbrunet@baylibre.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Jerome Brunet Feb. 15, 2018, 10:19 a.m. UTC
While introducing clk_core_set_phase_nolock, assigning core->phase was
mistakenly removed. Fixing this now

Fixes: 9e4d04adeb1a ("clk: add clk_core_set_phase_nolock function")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/clk/clk.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jerome Brunet March 8, 2018, 9:43 a.m. UTC | #1
On Thu, 2018-02-15 at 11:19 +0100, Jerome Brunet wrote:
> While introducing clk_core_set_phase_nolock, assigning core->phase was
> mistakenly removed. Fixing this now
> 
> Fixes: 9e4d04adeb1a ("clk: add clk_core_set_phase_nolock function")
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

Please drop this patch if favor of 

https://lkml.kernel.org/r/1520491781-132529-1-git-send-email-shawn.lin@rock-chip
s.com

Thanks
Jerome

> ---
>  drivers/clk/clk.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 9d56be6ead39..b33d362239e7 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -2314,6 +2314,9 @@ static int clk_core_set_phase_nolock(struct clk_core *core, int degrees)
>  	if (core->ops->set_phase)
>  		ret = core->ops->set_phase(core->hw, degrees);
>  
> +	if (!ret)
> +		core->phase = degrees;
> +
>  	trace_clk_set_phase_complete(core, degrees);
>  
>  	return ret;

--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9d56be6ead39..b33d362239e7 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2314,6 +2314,9 @@  static int clk_core_set_phase_nolock(struct clk_core *core, int degrees)
 	if (core->ops->set_phase)
 		ret = core->ops->set_phase(core->hw, degrees);
 
+	if (!ret)
+		core->phase = degrees;
+
 	trace_clk_set_phase_complete(core, degrees);
 
 	return ret;