Thermal: remove assert of thermal_zone_device_update()

Called by both of lpwork and Idle_Task:

[    0.000000] [ 0] [  INFO] [ap] thermal_zone_device_register: Registered zone device cpu-thermal
[    0.000000] [ 0] [ EMERG] [ap] _assert: Current Version: NuttX ap 0.0.0  Dec 11 2023 20:59:20 sim
[    0.000000] [ 0] [ EMERG] [ap] _assert: Assertion failed : at file: thermal/thermal_core.c:820 task: Idle_Task process: Kernel 0x32ade29

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2023-12-11 21:41:14 +08:00 committed by Xiang Xiao
parent 2480f599c6
commit f96d3798a1

View File

@ -27,7 +27,6 @@
#include <nuttx/power/pm.h>
#endif
#include <assert.h>
#include <debug.h>
#include <stdio.h>
#include <sys/boardctl.h>
@ -291,15 +290,11 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
{
case PM_SLEEP:
{
nxmutex_lock(&g_thermal_lock);
list_for_every_entry(&g_zone_dev_list, zdev,
struct thermal_zone_device_s, node)
{
work_cancel(LPWORK, &zdev->monitor);
}
nxmutex_unlock(&g_thermal_lock);
}
break;
case PM_RESTORE:
@ -307,8 +302,6 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
case PM_IDLE:
case PM_STANDBY:
{
nxmutex_lock(&g_thermal_lock);
list_for_every_entry(&g_zone_dev_list, zdev,
struct thermal_zone_device_s, node)
{
@ -319,8 +312,6 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
zdev->params->polling_delay);
}
}
nxmutex_unlock(&g_thermal_lock);
}
break;
default:
@ -816,8 +807,6 @@ void thermal_zone_device_update(FAR struct thermal_zone_device_s *zdev)
int temp;
int ret;
DEBUGASSERT(!is_idle_task(this_task()));
nxmutex_lock(&g_thermal_lock);
/* Update termerature */