return now <= rate && now > best;
}
+static int clk_core_round_rate_nolock(struct clk_core *core,
+ struct clk_rate_request *req);
+
int clk_mux_determine_rate_flags(struct clk_hw *hw,
struct clk_rate_request *req,
unsigned long flags)
if (core->flags & CLK_SET_RATE_NO_REPARENT) {
parent = core->parent;
if (core->flags & CLK_SET_RATE_PARENT) {
- ret = __clk_determine_rate(parent ? parent->hw : NULL,
- &parent_req);
+ if (!parent) {
+ req->rate = 0;
+ return 0;
+ }
+
+ ret = clk_core_round_rate_nolock(parent, &parent_req);
if (ret)
return ret;
if (core->flags & CLK_SET_RATE_PARENT) {
parent_req = *req;
- ret = __clk_determine_rate(parent->hw, &parent_req);
+ ret = clk_core_round_rate_nolock(parent, &parent_req);
if (ret)
continue;
} else {