diff options
author | Jerome Brunet | 2019-09-24 14:39:53 +0200 |
---|---|---|
committer | Stephen Boyd | 2019-12-23 18:53:13 -0800 |
commit | 89d079dc17e8a32397de827cc85c1f4911b90424 (patch) | |
tree | 13bd00045568d89041edc78c77ebd5d4c027e3e7 /drivers/clk/meson/sclk-div.c | |
parent | f6fa75ca912be6021335de63a32aa4d295f3c524 (diff) |
clk: let init callback return an error code
If the init callback is allowed to request resources, it needs a return
value to report the outcome of such a request.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lkml.kernel.org/r/20190924123954.31561-3-jbrunet@baylibre.com
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/meson/sclk-div.c')
-rw-r--r-- | drivers/clk/meson/sclk-div.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/meson/sclk-div.c b/drivers/clk/meson/sclk-div.c index 3acf03780221..76d31c0a3342 100644 --- a/drivers/clk/meson/sclk-div.c +++ b/drivers/clk/meson/sclk-div.c @@ -216,7 +216,7 @@ static int sclk_div_is_enabled(struct clk_hw *hw) return 0; } -static void sclk_div_init(struct clk_hw *hw) +static int sclk_div_init(struct clk_hw *hw) { struct clk_regmap *clk = to_clk_regmap(hw); struct meson_sclk_div_data *sclk = meson_sclk_div_data(clk); @@ -231,6 +231,8 @@ static void sclk_div_init(struct clk_hw *hw) sclk->cached_div = val + 1; sclk_div_get_duty_cycle(hw, &sclk->cached_duty); + + return 0; } const struct clk_ops meson_sclk_div_ops = { |