Skip to content

Commit 17a2cbc

Browse files
itirdeajic23
authored andcommitted
iio: core: Remove IIO_EV_TYPE_INSTANCE
By introducing IIO_EV_TYPE_CHANGE, IIO_EV_TYPE_INSTANCE becomes redundant. The effect of IIO_EV_TYPE_INSTANCE can be obtained by using IIO_EV_TYPE_CHANGE with IIO_EV_INFO_VALUE set to 1. Remove all instances of IIO_EV_TYPE_INSTANCE and replace them with IIO_EV_TYPE_CHANGE where needed. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 27be842 commit 17a2cbc

5 files changed

Lines changed: 3 additions & 7 deletions

File tree

‎drivers/iio/industrialio-event.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ static const char * const iio_ev_type_text[] = {
197197
[IIO_EV_TYPE_ROC] = "roc",
198198
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
199199
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
200-
[IIO_EV_TYPE_INSTANCE] = "instance",
201200
[IIO_EV_TYPE_CHANGE] = "change",
202201
};
203202

‎drivers/staging/iio/Documentation/iio_event_monitor.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ static const char * const iio_ev_type_text[] = {
5959
[IIO_EV_TYPE_ROC] = "roc",
6060
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
6161
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
62-
[IIO_EV_TYPE_INSTANCE] = "instance",
6362
[IIO_EV_TYPE_CHANGE] = "change",
6463
};
6564

@@ -179,7 +178,6 @@ static bool event_is_known(struct iio_event_data *event)
179178
case IIO_EV_TYPE_ROC:
180179
case IIO_EV_TYPE_THRESH_ADAPTIVE:
181180
case IIO_EV_TYPE_MAG_ADAPTIVE:
182-
case IIO_EV_TYPE_INSTANCE:
183181
case IIO_EV_TYPE_CHANGE:
184182
break;
185183
default:

‎drivers/staging/iio/iio_simple_dummy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static const struct iio_event_spec iio_dummy_event = {
7373
* simple step detect event - triggered when a step is detected
7474
*/
7575
static const struct iio_event_spec step_detect_event = {
76-
.type = IIO_EV_TYPE_INSTANCE,
76+
.type = IIO_EV_TYPE_CHANGE,
7777
.dir = IIO_EV_DIR_NONE,
7878
.mask_separate = BIT(IIO_EV_INFO_ENABLE),
7979
};

‎drivers/staging/iio/iio_simple_dummy_events.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
8686
}
8787
case IIO_STEPS:
8888
switch (type) {
89-
case IIO_EV_TYPE_INSTANCE:
89+
case IIO_EV_TYPE_CHANGE:
9090
st->event_en = state;
9191
break;
9292
default:
@@ -201,7 +201,7 @@ static irqreturn_t iio_simple_dummy_event_handler(int irq, void *private)
201201
iio_push_event(indio_dev,
202202
IIO_EVENT_CODE(IIO_STEPS, 0, IIO_NO_MOD,
203203
IIO_EV_DIR_NONE,
204-
IIO_EV_TYPE_INSTANCE, 0, 0, 0),
204+
IIO_EV_TYPE_CHANGE, 0, 0, 0),
205205
iio_get_time_ns());
206206
break;
207207
default:

‎include/linux/iio/types.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ enum iio_event_type {
7878
IIO_EV_TYPE_ROC,
7979
IIO_EV_TYPE_THRESH_ADAPTIVE,
8080
IIO_EV_TYPE_MAG_ADAPTIVE,
81-
IIO_EV_TYPE_INSTANCE,
8281
IIO_EV_TYPE_CHANGE,
8382
};
8483

0 commit comments

Comments
 (0)