Thermal/dummy: Fix depends error
1. cpufreq.h not found if cpufreq is not supported on some branches.
./thermal/thermal_dummy.c:25:10: fatal error: nuttx/cpufreq.h: No such file or directory
25 | #include <nuttx/cpufreq.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
2. debug.h is included by including <nuttx/cpufreq.h>, should not.
CC: thermal/thermal_dummy.c thermal/thermal_dummy.c: In function ‘thermal_dummy_init’:
thermal/thermal_dummy.c:338:7: warning: implicit declaration of function ‘therr’ [-Wimplicit-function-declaration]
338 | therr("Register cooling device fan0 failed!\n");
|
https://github.com/apache/nuttx/pull/12824
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
efd7e31b3a
commit
a73ee73c78
1 changed files with 6 additions and 0 deletions
|
|
@ -22,9 +22,13 @@
|
|||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#ifdef CONFIG_THERMAL_DUMMY_CPUFREQ
|
||||
#include <nuttx/cpufreq.h>
|
||||
#endif
|
||||
#include <nuttx/thermal.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -50,6 +54,7 @@ struct dummy_cooling_device_s
|
|||
unsigned int max_state;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_THERMAL_DUMMY_CPUFREQ
|
||||
struct dummy_cpufreq_driver_s
|
||||
{
|
||||
struct cpufreq_driver driver;
|
||||
|
|
@ -57,6 +62,7 @@ struct dummy_cpufreq_driver_s
|
|||
size_t table_len;
|
||||
struct cpufreq_frequency_table current;
|
||||
};
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue