diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2015-01-11 14:10:12 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-01-27 13:49:55 -0500 |
commit | 17a2cbc27981b85a09a48425c2614ae0cb7be8cd (patch) | |
tree | bae8c699bf39612dd6525c9096f8e0ac55aa0cc5 | |
parent | 27be84236d75c13a83c45d850390f40b58401d97 (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>
-rw-r--r-- | drivers/iio/industrialio-event.c | 1 | ||||
-rw-r--r-- | drivers/staging/iio/Documentation/iio_event_monitor.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/iio_simple_dummy.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/iio_simple_dummy_events.c | 4 | ||||
-rw-r--r-- | include/linux/iio/types.h | 1 |
5 files changed, 3 insertions, 7 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[] = { | |||
197 | [IIO_EV_TYPE_ROC] = "roc", | 197 | [IIO_EV_TYPE_ROC] = "roc", |
198 | [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", | 198 | [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", |
199 | [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", | 199 | [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", |
200 | [IIO_EV_TYPE_INSTANCE] = "instance", | ||
201 | [IIO_EV_TYPE_CHANGE] = "change", | 200 | [IIO_EV_TYPE_CHANGE] = "change", |
202 | }; | 201 | }; |
203 | 202 | ||
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[] = { | |||
59 | [IIO_EV_TYPE_ROC] = "roc", | 59 | [IIO_EV_TYPE_ROC] = "roc", |
60 | [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", | 60 | [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", |
61 | [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", | 61 | [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", |
62 | [IIO_EV_TYPE_INSTANCE] = "instance", | ||
63 | [IIO_EV_TYPE_CHANGE] = "change", | 62 | [IIO_EV_TYPE_CHANGE] = "change", |
64 | }; | 63 | }; |
65 | 64 | ||
@@ -179,7 +178,6 @@ static bool event_is_known(struct iio_event_data *event) | |||
179 | case IIO_EV_TYPE_ROC: | 178 | case IIO_EV_TYPE_ROC: |
180 | case IIO_EV_TYPE_THRESH_ADAPTIVE: | 179 | case IIO_EV_TYPE_THRESH_ADAPTIVE: |
181 | case IIO_EV_TYPE_MAG_ADAPTIVE: | 180 | case IIO_EV_TYPE_MAG_ADAPTIVE: |
182 | case IIO_EV_TYPE_INSTANCE: | ||
183 | case IIO_EV_TYPE_CHANGE: | 181 | case IIO_EV_TYPE_CHANGE: |
184 | break; | 182 | break; |
185 | default: | 183 | 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 = { | |||
73 | * simple step detect event - triggered when a step is detected | 73 | * simple step detect event - triggered when a step is detected |
74 | */ | 74 | */ |
75 | static const struct iio_event_spec step_detect_event = { | 75 | static const struct iio_event_spec step_detect_event = { |
76 | .type = IIO_EV_TYPE_INSTANCE, | 76 | .type = IIO_EV_TYPE_CHANGE, |
77 | .dir = IIO_EV_DIR_NONE, | 77 | .dir = IIO_EV_DIR_NONE, |
78 | .mask_separate = BIT(IIO_EV_INFO_ENABLE), | 78 | .mask_separate = BIT(IIO_EV_INFO_ENABLE), |
79 | }; | 79 | }; |
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, | |||
86 | } | 86 | } |
87 | case IIO_STEPS: | 87 | case IIO_STEPS: |
88 | switch (type) { | 88 | switch (type) { |
89 | case IIO_EV_TYPE_INSTANCE: | 89 | case IIO_EV_TYPE_CHANGE: |
90 | st->event_en = state; | 90 | st->event_en = state; |
91 | break; | 91 | break; |
92 | default: | 92 | default: |
@@ -201,7 +201,7 @@ static irqreturn_t iio_simple_dummy_event_handler(int irq, void *private) | |||
201 | iio_push_event(indio_dev, | 201 | iio_push_event(indio_dev, |
202 | IIO_EVENT_CODE(IIO_STEPS, 0, IIO_NO_MOD, | 202 | IIO_EVENT_CODE(IIO_STEPS, 0, IIO_NO_MOD, |
203 | IIO_EV_DIR_NONE, | 203 | IIO_EV_DIR_NONE, |
204 | IIO_EV_TYPE_INSTANCE, 0, 0, 0), | 204 | IIO_EV_TYPE_CHANGE, 0, 0, 0), |
205 | iio_get_time_ns()); | 205 | iio_get_time_ns()); |
206 | break; | 206 | break; |
207 | default: | 207 | default: |
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 3ba3d6678412..580ed5bdb3fa 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h | |||
@@ -78,7 +78,6 @@ enum iio_event_type { | |||
78 | IIO_EV_TYPE_ROC, | 78 | IIO_EV_TYPE_ROC, |
79 | IIO_EV_TYPE_THRESH_ADAPTIVE, | 79 | IIO_EV_TYPE_THRESH_ADAPTIVE, |
80 | IIO_EV_TYPE_MAG_ADAPTIVE, | 80 | IIO_EV_TYPE_MAG_ADAPTIVE, |
81 | IIO_EV_TYPE_INSTANCE, | ||
82 | IIO_EV_TYPE_CHANGE, | 81 | IIO_EV_TYPE_CHANGE, |
83 | }; | 82 | }; |
84 | 83 | ||