Call acct_update_power() to track power usage of task only if
CONFIG_CPU_FREQ_STAT is enabled, otherwise we run into
following build failure:
---------------
kernel/built-in.o: In function `account_user_time':
kernel/sched/cputime.c:155: undefined reference to `acct_update_power'
kernel/built-in.o: In function `__account_system_time':
kernel/sched/cputime.c:208: undefined reference to `acct_update_power'
make: *** [vmlinux] Error 1
---------------
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
/* Account for user time used */
acct_account_cputime(p);
+#ifdef CONFIG_CPU_FREQ_STAT
/* Account power usage for user time */
acct_update_power(p, cputime);
+#endif
}
/*
/* Account for system time used */
acct_account_cputime(p);
+#ifdef CONFIG_CPU_FREQ_STAT
/* Account power usage for system time */
acct_update_power(p, cputime);
+#endif
}
/*