drivers: sensor: sm351lt: Fix global thread triggering bug
This fixes a bug in the sm351lt driver whereby global triggering will cause an MPU fault due to an unset pointer. Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
2ad1ef651b
commit
e1ee34e55c
|
@ -209,9 +209,9 @@ static int sm351lt_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#if defined(CONFIG_SM351LT_TRIGGER)
|
||||
#if defined(CONFIG_SM351LT_TRIGGER_OWN_THREAD)
|
||||
data->dev = dev;
|
||||
|
||||
#if defined(CONFIG_SM351LT_TRIGGER_OWN_THREAD)
|
||||
k_sem_init(&data->gpio_sem, 0, K_SEM_MAX_LIMIT);
|
||||
|
||||
k_thread_create(&data->thread, data->thread_stack,
|
||||
|
|
Loading…
Reference in New Issue