All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 1/2] clk: at91: fix clk-generated parenting
@ 2017-05-12 14:25 Alexandre Belloni
  2017-05-12 14:25 ` [PATCH v4 2/2] clk: at91: Add sama5d2 suspend/resume Alexandre Belloni
  2017-05-19  1:33 ` [PATCH v4 1/2] clk: at91: fix clk-generated parenting Stephen Boyd
  0 siblings, 2 replies; 7+ messages in thread
From: Alexandre Belloni @ 2017-05-12 14:25 UTC (permalink / raw)
  To: Boris Brezillon, Stephen Boyd, Nicolas Ferre
  Cc: linux-clk, linux-kernel, Alexandre Belloni

clk_generated_startup is called after clk_hw_register. So the first call to
get_parent will not have the correct value (i.e. 0) and because this is
cached, it may never be updated.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/clk/at91/clk-generated.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
index 4e1cd5aa69d8..70474bd97a10 100644
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -260,13 +260,12 @@ at91_clk_register_generated(struct regmap *regmap, spinlock_t *lock,
 	gck->lock = lock;
 	gck->range = *range;
 
+	clk_generated_startup(gck);
 	hw = &gck->hw;
 	ret = clk_hw_register(NULL, &gck->hw);
 	if (ret) {
 		kfree(gck);
 		hw = ERR_PTR(ret);
-	} else
-		clk_generated_startup(gck);
 
 	return hw;
 }
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-05 14:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 14:25 [PATCH v4 1/2] clk: at91: fix clk-generated parenting Alexandre Belloni
2017-05-12 14:25 ` [PATCH v4 2/2] clk: at91: Add sama5d2 suspend/resume Alexandre Belloni
2017-06-01  7:46   ` Stephen Boyd
2017-06-05 14:25     ` Alexandre Belloni
2017-05-19  1:33 ` [PATCH v4 1/2] clk: at91: fix clk-generated parenting Stephen Boyd
2017-05-30  9:50   ` Alexandre Belloni
2017-06-01  7:47     ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.