On Tue, Jun 16, 2015 at 12:48 AM, Hartmut Knaack <knaack.h@xxxxxx> wrote: > > In bmc150_accel_unregister_triggers() triggers should be unregistered in > reverse order of registration. Trigger registration starts with number 0, > counting up. In consequence, trigger number needs to be count down here. > > Signed-off-by: Hartmut Knaack <knaack.h@xxxxxx> Reviewed-by: Octavian Purdila <octavian.purdila@xxxxxxxxx> > --- > drivers/iio/accel/bmc150-accel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/accel/bmc150-accel.c b/drivers/iio/accel/bmc150-accel.c > index 4e70f51..cc5a357 100644 > --- a/drivers/iio/accel/bmc150-accel.c > +++ b/drivers/iio/accel/bmc150-accel.c > @@ -1464,7 +1464,7 @@ static void bmc150_accel_unregister_triggers(struct bmc150_accel_data *data, > { > int i; > > - for (i = from; i >= 0; i++) { > + for (i = from; i >= 0; i--) { > if (data->triggers[i].indio_trig) { > iio_trigger_unregister(data->triggers[i].indio_trig); > data->triggers[i].indio_trig = NULL; > -- > 2.3.6 > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html