clk: Update clk_get_sys to return ENOENT on failure

clk_get_sys was updated to return EPROBE_DEFER because on the
older kernel returning ENOENT was causing drivers that probed
before the clock provider to fail instead of deferring. The new
kernel version fixes this by returning EPROBE_DEFER in
__of_clk_get_from_provider. Thus, clk_get_sys failing means that
the clock provider exists, but the requested clock is not defined
in the provider, in which case ENOENT is a more appropriate error
code to return.

Change-Id: I67d60bf5c0d2dfb71a189e351bc5b4c535d280bb
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
This commit is contained in:
Devesh Jhunjhunwala 2016-04-01 12:20:52 -07:00 committed by Jeevan Shriram
parent 60fcb53abb
commit baa8ac7b81

View file

@ -186,7 +186,7 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id)
out:
mutex_unlock(&clocks_mutex);
return cl ? cl->clk : ERR_PTR(-EPROBE_DEFER);
return cl ? cl->clk : ERR_PTR(-ENOENT);
}
EXPORT_SYMBOL(clk_get_sys);