@@ -1031,9 +1031,9 @@ static irqreturn_t mma9553_event_handler(int irq, void *private)
1031
1031
if (ev_step_detect -> enabled && (stepcnt != data -> stepcnt )) {
1032
1032
data -> stepcnt = stepcnt ;
1033
1033
iio_push_event (indio_dev ,
1034
- IIO_EVENT_CODE (IIO_STEPS , 0 , IIO_NO_MOD ,
1035
- IIO_EV_DIR_NONE ,
1036
- IIO_EV_TYPE_CHANGE , 0 , 0 , 0 ),
1034
+ IIO_UNMOD_EVENT_CODE (IIO_STEPS , 0 ,
1035
+ IIO_EV_TYPE_CHANGE ,
1036
+ IIO_EV_DIR_NONE ),
1037
1037
data -> timestamp );
1038
1038
}
1039
1039
@@ -1042,20 +1042,18 @@ static irqreturn_t mma9553_event_handler(int irq, void *private)
1042
1042
/* ev_activity can be NULL if activity == ACTIVITY_UNKNOWN */
1043
1043
if (ev_prev_activity && ev_prev_activity -> enabled )
1044
1044
iio_push_event (indio_dev ,
1045
- IIO_EVENT_CODE (IIO_ACTIVITY , 0 ,
1046
- ev_prev_activity -> info -> mod ,
1047
- IIO_EV_DIR_FALLING ,
1048
- IIO_EV_TYPE_THRESH , 0 , 0 ,
1049
- 0 ),
1045
+ IIO_MOD_EVENT_CODE (IIO_ACTIVITY , 0 ,
1046
+ ev_prev_activity -> info -> mod ,
1047
+ IIO_EV_TYPE_THRESH ,
1048
+ IIO_EV_DIR_FALLING ),
1050
1049
data -> timestamp );
1051
1050
1052
1051
if (ev_activity && ev_activity -> enabled )
1053
1052
iio_push_event (indio_dev ,
1054
- IIO_EVENT_CODE (IIO_ACTIVITY , 0 ,
1055
- ev_activity -> info -> mod ,
1056
- IIO_EV_DIR_RISING ,
1057
- IIO_EV_TYPE_THRESH , 0 , 0 ,
1058
- 0 ),
1053
+ IIO_MOD_EVENT_CODE (IIO_ACTIVITY , 0 ,
1054
+ ev_activity -> info -> mod ,
1055
+ IIO_EV_TYPE_THRESH ,
1056
+ IIO_EV_DIR_RISING ),
1059
1057
data -> timestamp );
1060
1058
}
1061
1059
mutex_unlock (& data -> mutex );
0 commit comments