cpufreq: interactive: use mult_frac in sl_busy_to_laf

Currently the load argument is taken as unsigned long in
sl_busy_to_laf. In case of 32-bit kernels, the use of
unsigned long results in overflows since it is only 32-bits.
And so the cpu_load calculation is going wrong and most of
the times getting reported very low values. Hence use
mult_frac call to avoid overflows when the final result
is expected to be within 32-bits.

Change-Id: Ib9e8bf6e777cd07b141761fb14c80840563b4cd5
Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index ef635bc..90638f3 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -464,11 +464,13 @@
 static unsigned int sl_busy_to_laf(struct cpufreq_interactive_policyinfo *ppol,
 				   unsigned long busy)
 {
+	int prev_load;
 	struct cpufreq_interactive_tunables *tunables =
 		ppol->policy->governor_data;
 
-	busy *= ppol->policy->cpuinfo.max_freq;
-	return div64_s64(busy, tunables->timer_rate) * 100;
+	prev_load = mult_frac(ppol->policy->cpuinfo.max_freq * 100,
+				busy, tunables->timer_rate);
+	return prev_load;
 }
 
 #define NEW_TASK_RATIO 75