icm42688: Remove unnecessary locks

The entire switch statement is already wrapped in a lock which is
acquired just before configuring the gpio pin.

Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
Yuval Peress 2024-01-04 08:04:12 -07:00 committed by Carles Cufí
commit 3f2d6efc9c

View file

@ -99,9 +99,7 @@ int icm42688_trigger_set(const struct device *dev, const struct sensor_trigger *
data->data_ready_handler = handler;
data->data_ready_trigger = trig;
icm42688_lock(dev);
icm42688_spi_read(&cfg->spi, REG_INT_STATUS, &status, 1);
icm42688_unlock(dev);
break;
default:
res = -ENOTSUP;