diff options
Diffstat (limited to 'driver/accelgyro_icm426xx.c')
-rw-r--r-- | driver/accelgyro_icm426xx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/driver/accelgyro_icm426xx.c b/driver/accelgyro_icm426xx.c index 27d590b96e..b83c166084 100644 --- a/driver/accelgyro_icm426xx.c +++ b/driver/accelgyro_icm426xx.c @@ -909,11 +909,10 @@ static int icm426xx_init(const struct motion_sensor_t *s) if (ret) goto out_unlock; -#ifdef CONFIG_ACCEL_INTERRUPTS - ret = icm426xx_config_interrupt(s); + if (IS_ENABLED(CONFIG_ACCEL_INTERRUPTS)) + ret = icm426xx_config_interrupt(s); if (ret) goto out_unlock; -#endif } for (i = X; i <= Z; i++) |