From a3ba3d67ea73867b2904a9285e1d472451e67aa5 Mon Sep 17 00:00:00 2001
From: zhangqing <zhangqing@rock-chips.com>
Date: Tue, 9 Jun 2015 07:31:06 -0700
Subject: [PATCH] rk3x: rmic: rk818: fix the code build warning in rk3288.

Signed-off-by: chenjianhong <cjh@rock-chips.com>
---
 drivers/power/rk818_battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/rk818_battery.c b/drivers/power/rk818_battery.c
index 9982dcae1e9c..07f3300df0e1 100755
--- a/drivers/power/rk818_battery.c
+++ b/drivers/power/rk818_battery.c
@@ -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) {
-- 
2.34.1