Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90365a03 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

adreno_tz: Fix compilation errors for 32bit kernel



This fixes below compilation error for 32bit kernel
build. Compiler reference __aeabi_uldivmod if there
is a 64bit divide or module. Change is to use do_div
to fix this.

governor_msm_adreno_tz.c: undefined reference to `__aeabi_uldivmod'.

Change-Id: I4de7ada2274698d20d304d8ffe1a92d3bcb7653d
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent b318a6e0
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ void compute_work_load(struct devfreq_dev_status *stats,
		struct devfreq_msm_adreno_tz_data *priv,
		struct devfreq *devfreq)
{
	u64 busy;

	spin_lock(&sample_lock);
	/*
	 * Keep collecting the stats till the client
@@ -148,9 +150,10 @@ void compute_work_load(struct devfreq_dev_status *stats,
	 * is done when the entry is read
	 */
	acc_total += stats->total_time;
	acc_relative_busy += ((u64)stats->busy_time *
				stats->current_frequency) /
				devfreq->profile->freq_table[0];
	busy = (u64)stats->busy_time * stats->current_frequency;
	do_div(busy, devfreq->profile->freq_table[0]);
	acc_relative_busy += busy;

	spin_unlock(&sample_lock);
}