]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iio: core: Remove IIO_EV_TYPE_INSTANCE
authorIrina Tirdea <irina.tirdea@intel.com>
Sun, 11 Jan 2015 19:10:12 +0000 (21:10 +0200)
committerJonathan Cameron <jic23@kernel.org>
Tue, 27 Jan 2015 18:49:55 +0000 (18:49 +0000)
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>
drivers/iio/industrialio-event.c
drivers/staging/iio/Documentation/iio_event_monitor.c
drivers/staging/iio/iio_simple_dummy.c
drivers/staging/iio/iio_simple_dummy_events.c
include/linux/iio/types.h

index b33ce55eb695082fcb82102ef8611e8b59e5f23d..a4b397048f71f9fe2e22be46f45fca0fb06cb8ff 100644 (file)
@@ -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",
 };
 
index 2e78d58b9b779eb1f5c26a74d82e831bc6cfd98d..72c96aa6e9929c4f32bf000b7b067279898264ac 100644 (file)
@@ -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:
index 0b8611ac100308978efb4a04e81932f78437da9d..e4520213f627fe431597817ac8c4099bde40f1c4 100644 (file)
@@ -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),
 };
index ac15a44ba2713213a14c4dc3ccaecc11b4ed9606..a5cd3bb219fe783bb6b81bb7fc635338eca416e8 100644 (file)
@@ -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:
index 3ba3d66784126f94c46db000f002eac0cf251b60..580ed5bdb3fa9c0cdca4cfc29105f26c5de7ba95 100644 (file)
@@ -78,7 +78,6 @@ enum iio_event_type {
        IIO_EV_TYPE_ROC,
        IIO_EV_TYPE_THRESH_ADAPTIVE,
        IIO_EV_TYPE_MAG_ADAPTIVE,
-       IIO_EV_TYPE_INSTANCE,
        IIO_EV_TYPE_CHANGE,
 };