summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@intel.com>2015-01-11 21:10:12 +0200
committerJonathan Cameron <jic23@kernel.org>2015-01-27 18:49:55 +0000
commit17a2cbc27981b85a09a48425c2614ae0cb7be8cd (patch)
treebae8c699bf39612dd6525c9096f8e0ac55aa0cc5 /drivers
parent27be84236d75c13a83c45d850390f40b58401d97 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/industrialio-event.c1
-rw-r--r--drivers/staging/iio/Documentation/iio_event_monitor.c2
-rw-r--r--drivers/staging/iio/iio_simple_dummy.c2
-rw-r--r--drivers/staging/iio/iio_simple_dummy_events.c4
4 files changed, 3 insertions, 6 deletions
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index b33ce55eb695..a4b397048f71 100644
--- a/drivers/iio/industrialio-event.c
+++ b/drivers/iio/industrialio-event.c
@@ -197,7 +197,6 @@ static const char * const iio_ev_type_text[] = {
[IIO_EV_TYPE_ROC] = "roc",
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
- [IIO_EV_TYPE_INSTANCE] = "instance",
[IIO_EV_TYPE_CHANGE] = "change",
};
diff --git a/drivers/staging/iio/Documentation/iio_event_monitor.c b/drivers/staging/iio/Documentation/iio_event_monitor.c
index 2e78d58b9b77..72c96aa6e992 100644
--- a/drivers/staging/iio/Documentation/iio_event_monitor.c
+++ b/drivers/staging/iio/Documentation/iio_event_monitor.c
@@ -59,7 +59,6 @@ static const char * const iio_ev_type_text[] = {
[IIO_EV_TYPE_ROC] = "roc",
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
- [IIO_EV_TYPE_INSTANCE] = "instance",
[IIO_EV_TYPE_CHANGE] = "change",
};
@@ -179,7 +178,6 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_EV_TYPE_ROC:
case IIO_EV_TYPE_THRESH_ADAPTIVE:
case IIO_EV_TYPE_MAG_ADAPTIVE:
- case IIO_EV_TYPE_INSTANCE:
case IIO_EV_TYPE_CHANGE:
break;
default:
diff --git a/drivers/staging/iio/iio_simple_dummy.c b/drivers/staging/iio/iio_simple_dummy.c
index 0b8611ac1003..e4520213f627 100644
--- a/drivers/staging/iio/iio_simple_dummy.c
+++ b/drivers/staging/iio/iio_simple_dummy.c
@@ -73,7 +73,7 @@ static const struct iio_event_spec iio_dummy_event = {
* simple step detect event - triggered when a step is detected
*/
static const struct iio_event_spec step_detect_event = {
- .type = IIO_EV_TYPE_INSTANCE,
+ .type = IIO_EV_TYPE_CHANGE,
.dir = IIO_EV_DIR_NONE,
.mask_separate = BIT(IIO_EV_INFO_ENABLE),
};
diff --git a/drivers/staging/iio/iio_simple_dummy_events.c b/drivers/staging/iio/iio_simple_dummy_events.c
index ac15a44ba271..a5cd3bb219fe 100644
--- a/drivers/staging/iio/iio_simple_dummy_events.c
+++ b/drivers/staging/iio/iio_simple_dummy_events.c
@@ -86,7 +86,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
}
case IIO_STEPS:
switch (type) {
- case IIO_EV_TYPE_INSTANCE:
+ case IIO_EV_TYPE_CHANGE:
st->event_en = state;
break;
default:
@@ -201,7 +201,7 @@ static irqreturn_t iio_simple_dummy_event_handler(int irq, void *private)
iio_push_event(indio_dev,
IIO_EVENT_CODE(IIO_STEPS, 0, IIO_NO_MOD,
IIO_EV_DIR_NONE,
- IIO_EV_TYPE_INSTANCE, 0, 0, 0),
+ IIO_EV_TYPE_CHANGE, 0, 0, 0),
iio_get_time_ns());
break;
default: