ANDROID: Fix compilation error when CPU_FREQ is disabled

The following compilation error can be observed when CONFIG_CPU_FREQ
is disabled, while CONFIG_ANDROID_VENDOR_HOOKS is enabled:

include/trace/hooks/cpufreq.h:14:18: warning: declaration of 'struct
cpufreq_policy' will not be visible outside of this function
[-Wvisibility] error, forbidden warning: cpufreq.h:14.

Include the cpufreq header in the cpufreq trace hooks header to
fix the compilation error.

Bug: 181956431
Change-Id: I33ef6d91cfde856891d8cf7f345710f6b8c2c7ac
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres
2021-03-05 11:17:49 -08:00
committed by Todd Kjos
parent c7d68c4502
commit 39fedc3a58

View File

@@ -7,6 +7,7 @@
#if !defined(_TRACE_HOOK_CPUFREQ_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_CPUFREQ_H
#include <linux/cpufreq.h>
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>