Re: [PATCH 1/3] iio:accel:bmc150-accel: fix counting direction

Jonathan Cameron
2015-06-21T13:43:15Z

On 16/06/15 11:31, Octavian Purdila wrote:
> On Tue, Jun 16, 2015 at 12:48 AM, Hartmut Knaack <knaack.h@gmx.de> 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@gmx.de>
>
> Reviewed-by: Octavian Purdila <octavian.purdila@intel.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan
>
>
>> ---
>> 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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in