ramips: enable the seama mtdsplit parser
[openwrt.git] / target / linux / ipq806x / patches / 0108-clk-qcom-Return-error-pointers-for-unimplemented-clo.patch
1 From 77b7f864b03d6b49c143a9c8c19432feef3032b5 Mon Sep 17 00:00:00 2001
2 From: Stephen Boyd <sboyd@codeaurora.org>
3 Date: Fri, 16 May 2014 16:07:14 -0700
4 Subject: [PATCH 108/182] clk: qcom: Return error pointers for unimplemented
5  clocks
6
7 Not all clocks are implemented but client drivers can still
8 request them. Currently we will return a NULL pointer to them if
9 the clock isn't implemented in software but NULL pointers are
10 valid clock pointers. Return an error pointer so that driver's
11 don't proceed without a clock they may actually need.
12
13 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
14 Signed-off-by: Mike Turquette <mturquette@linaro.org>
15 ---
16  drivers/clk/qcom/common.c |    4 +++-
17  1 file changed, 3 insertions(+), 1 deletion(-)
18
19 --- a/drivers/clk/qcom/common.c
20 +++ b/drivers/clk/qcom/common.c
21 @@ -62,8 +62,10 @@ int qcom_cc_probe(struct platform_device
22         data->clk_num = num_clks;
23  
24         for (i = 0; i < num_clks; i++) {
25 -               if (!rclks[i])
26 +               if (!rclks[i]) {
27 +                       clks[i] = ERR_PTR(-ENOENT);
28                         continue;
29 +               }
30                 clk = devm_clk_register_regmap(dev, rclks[i]);
31                 if (IS_ERR(clk))
32                         return PTR_ERR(clk);