rk3x: rmic: rk818: fix the code build warning in rk3288.
authorzhangqing <zhangqing@rock-chips.com>
Tue, 9 Jun 2015 14:31:06 +0000 (07:31 -0700)
committerzhangqing <zhangqing@rock-chips.com>
Tue, 9 Jun 2015 14:31:06 +0000 (07:31 -0700)
Signed-off-by: chenjianhong <cjh@rock-chips.com>
drivers/power/rk818_battery.c

index 9982dcae1e9c1c0210408af839085828c371f808..07f3300df0e19d526c5c43cbcc08a97d60a86e84 100755 (executable)
@@ -3085,9 +3085,9 @@ static int rk81x_bat_get_rsoc_trend(struct rk81x_battery *di, int *trend_mult)
        if (di->s2r && !di->slp_psy_status)
                di->trend_start_cap = di->remain_capacity;
 
+       diff_cap = remain_cap - trend_start_cap;
        DBG("<%s>. trend_start_cap = %d, diff_cap = %d\n",
            __func__, trend_start_cap, diff_cap);
-       diff_cap = remain_cap - trend_start_cap;
        *trend_mult = abs(diff_cap) / TREND_CAP_DIFF;
 
        if (abs(diff_cap) >= TREND_CAP_DIFF) {