Skip to content

Commit f96d379

Browse files
JianyuWang0623xiaoxiang781216
authored andcommitted
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>
1 parent 2480f59 commit f96d379

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

drivers/thermal/thermal_core.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <nuttx/power/pm.h>
2828
#endif
2929

30-
#include <assert.h>
3130
#include <debug.h>
3231
#include <stdio.h>
3332
#include <sys/boardctl.h>
@@ -291,24 +290,18 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
291290
{
292291
case PM_SLEEP:
293292
{
294-
nxmutex_lock(&g_thermal_lock);
295-
296293
list_for_every_entry(&g_zone_dev_list, zdev,
297294
struct thermal_zone_device_s, node)
298295
{
299296
work_cancel(LPWORK, &zdev->monitor);
300297
}
301-
302-
nxmutex_unlock(&g_thermal_lock);
303298
}
304299
break;
305300
case PM_RESTORE:
306301
case PM_NORMAL:
307302
case PM_IDLE:
308303
case PM_STANDBY:
309304
{
310-
nxmutex_lock(&g_thermal_lock);
311-
312305
list_for_every_entry(&g_zone_dev_list, zdev,
313306
struct thermal_zone_device_s, node)
314307
{
@@ -319,8 +312,6 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
319312
zdev->params->polling_delay);
320313
}
321314
}
322-
323-
nxmutex_unlock(&g_thermal_lock);
324315
}
325316
break;
326317
default:
@@ -816,8 +807,6 @@ void thermal_zone_device_update(FAR struct thermal_zone_device_s *zdev)
816807
int temp;
817808
int ret;
818809

819-
DEBUGASSERT(!is_idle_task(this_task()));
820-
821810
nxmutex_lock(&g_thermal_lock);
822811

823812
/* Update termerature */

0 commit comments

Comments
 (0)