drivers/sensors: sensor bug fix.
Build Documentation / build-html (push) Has been cancelled

fix deadlock about set_nonwakeup.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1
2025-02-11 20:25:41 +08:00
committed by Donny(董九柱)
parent 7b154402fb
commit 90fa0ed122
+5 -2
View File
@@ -467,13 +467,16 @@ static void sensor_update_nonwakeup(FAR struct file *filep,
if (nonwakeup != upper->state.nonwakeup)
{
upper->state.nonwakeup = nonwakeup;
nxrmutex_unlock(&upper->lock);
if (lower->ops->set_nonwakeup)
{
lower->ops->set_nonwakeup(lower, filep, nonwakeup);
}
}
nxrmutex_unlock(&upper->lock);
else
{
nxrmutex_unlock(&upper->lock);
}
}
static void sensor_generate_timing(FAR struct sensor_upperhalf_s *upper,