From: Soren Brinkmann Date: Tue, 16 Apr 2013 17:06:50 +0000 (-0700) Subject: clk: Always notify whole subtree when reparenting X-Git-Tag: v3.11-rc1~109^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3aab5d61400b794ec759b9345e93e7ba57eb369;p=profile%2Fivi%2Fkernel-x86-ivi.git clk: Always notify whole subtree when reparenting A clock's notifier count only reflects notifiers which are registered directly for that clock. A reparent operation though affects the whole subtree because of a potential rate change. When issuing the pre rate change notifications only the notifier count for the clock to be changed is considered and notifiers for subclocks may never be called. Resulting in clocks in the subtree which have registered notifiers, may receive a POST_- or ABORT_RATE_CHANGE notification, without a PRE_RATE_CHANGE_NOTIFICATION. Therefore always traverse the whole subtree when issueing pre rate change notifications during a reparent operation. Signed-off-by: Soren Brinkmann Signed-off-by: Mike Turquette --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 2e669a8..edf3fe1 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1493,8 +1493,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) } /* propagate PRE_RATE_CHANGE notifications */ - if (clk->notifier_count) - ret = __clk_speculate_rates(clk, p_rate); + ret = __clk_speculate_rates(clk, p_rate); /* abort if a driver objects */ if (ret & NOTIFY_STOP_MASK)