/* handle the new child who might not be in core->children yet */
if (core->new_child)
clk_change_rate(core->new_child);
++++
++++ clk_pm_runtime_put(core);
+ ++}
+ ++
+ ++static unsigned long clk_core_req_round_rate_nolock(struct clk_core *core,
+ ++ unsigned long req_rate)
+ ++{
+ ++ int ret, cnt;
+ ++ struct clk_rate_request req;
+ ++
+ ++ lockdep_assert_held(&prepare_lock);
+ ++
+ ++ if (!core)
+ ++ return 0;
+ ++
+ ++ /* simulate what the rate would be if it could be freely set */
+ ++ cnt = clk_core_rate_nuke_protect(core);
+ ++ if (cnt < 0)
+ ++ return cnt;
+ ++
+ ++ clk_core_get_boundaries(core, &req.min_rate, &req.max_rate);
+ ++ req.rate = req_rate;
+ ++
+ ++ ret = clk_core_round_rate_nolock(core, &req);
+ ++
+ ++ /* restore the protection */
+ ++ clk_core_rate_restore_protect(core, cnt);
+ ++
+ ++ return ret ? 0 : req.rate;
}
static int clk_core_set_rate_nolock(struct clk_core *core,
if (!d)
goto err_out;
- d = debugfs_create_u32("clk_protect_count", S_IRUGO, core->dentry,
- (u32 *)&core->protect_count);
- -- d = debugfs_create_u32("clk_notifier_count", S_IRUGO, core->dentry,
- -- (u32 *)&core->notifier_count);
++ ++ d = debugfs_create_u32("clk_protect_count", 0444, core->dentry,
++ ++ &core->protect_count);
+ ++ if (!d)
+ ++ goto err_out;
+ ++
- d = debugfs_create_u32("clk_notifier_count", S_IRUGO, core->dentry,
- (u32 *)&core->notifier_count);
++ ++ d = debugfs_create_u32("clk_notifier_count", 0444, core->dentry,
++ ++ &core->notifier_count);
if (!d)
goto err_out;