From: Stephen Boyd Date: Sat, 27 Jan 2018 00:43:32 +0000 (-0800) Subject: Merge branches 'clk-remove-asm-clkdev', 'clk-debugfs-fixes', 'clk-renesas' and 'clk... X-Git-Tag: for-linus-20180210~5^2~1 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4d1d13a5ae8d468923106d5b05de407bc25cefa2;p=linux-block.git Merge branches 'clk-remove-asm-clkdev', 'clk-debugfs-fixes', 'clk-renesas' and 'clk-meson' into clk-next * clk-remove-asm-clkdev: clk: Move __clk_{get,put}() into private clk.h API clk: sunxi: Use CLK_IS_CRITICAL flag for critical clks arch: Remove clkdev.h asm-generic from Kbuild clk: Prepare to remove asm-generic/clkdev.h blackfin: Use generic clkdev.h header * clk-debugfs-fixes: clk: Simplify debugfs registration clk: Fix debugfs_create_*() usage clk: Show symbolic clock flags in debugfs clk: Improve flags doc for of_clk_detect_critical() * clk-renesas: clk: renesas: r8a7796: Add FDP clock clk: renesas: cpg-mssr: Keep wakeup sources active during system suspend clk: renesas: mstp: Keep wakeup sources active during system suspend clk: renesas: r8a77970: Add LVDS clock * clk-meson: clk: meson-axg: fix potential NULL dereference in axg_clkc_probe() clk: meson-axg: make local symbol axg_gp0_params_table static clk: meson-axg: fix return value check in axg_clkc_probe() clk: meson: mpll: use 64-bit maths in params_from_rate clk: meson-axg: add clock controller drivers clk: meson-axg: add clocks dt-bindings required header dt-bindings: clock: add compatible variant for the Meson-AXG clk: meson: make the spinlock naming more specific clk: meson: gxbb: remove IGNORE_UNUSED from mmc clocks clk: meson: gxbb: fix wrong clock for SARADC/SANA --- 4d1d13a5ae8d468923106d5b05de407bc25cefa2 diff --cc drivers/clk/clk.c index 5ec580914089,647d056df88c,0a52357ded5c,647d056df88c,647d056df88c..32867dda6c1c --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@@@@@ -1819,35 -1634,6 -1817,33 -1634,6 -1634,6 +1820,35 @@@@@@ static void clk_change_rate(struct clk_ /* 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, @@@@@@ -2630,13 -2288,8 -2676,13 -2288,8 -2288,8 +2681,13 @@@@@@ static int clk_debug_create_one(struct 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;