Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/qcom', 'asoc/topic...
[firefly-linux-kernel-4.4.55.git] / sound / soc / codecs / arizona.c
index 29202610dd0dd90d72329265633844a3d833d640..9015b44a9e1101d47d25ad94934de6420ca8d1a6 100644 (file)
@@ -1901,7 +1901,7 @@ static int arizona_is_enabled_fll(struct arizona_fll *fll)
 static int arizona_enable_fll(struct arizona_fll *fll)
 {
        struct arizona *arizona = fll->arizona;
-       int ret;
+       unsigned long time_left;
        bool use_sync = false;
        int already_enabled = arizona_is_enabled_fll(fll);
        struct arizona_fll_cfg cfg;
@@ -1977,9 +1977,9 @@ static int arizona_enable_fll(struct arizona_fll *fll)
                regmap_update_bits_async(arizona->regmap, fll->base + 1,
                                         ARIZONA_FLL1_FREERUN, 0);
 
-       ret = wait_for_completion_timeout(&fll->ok,
+       time_left = wait_for_completion_timeout(&fll->ok,
                                          msecs_to_jiffies(250));
-       if (ret == 0)
+       if (time_left == 0)
                arizona_fll_warn(fll, "Timed out waiting for lock\n");
 
        return 0;