Skip to contentSkip to conversation

patch "iio:accel:bmc150-accel: fix counting direction" added to staging-linus

PATCH [email protected] 1 participant 1 message Jul 23, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio:accel:bmc150-accel: fix counting direction

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From c13c9da6d86fa9cb6449deb6c71b18ffcf32ae53 Mon Sep 17 00:00:00 2001

From: Hartmut Knaack <[email protected]>
Date: Mon, 15 Jun 2015 23:48:24 +0200
Subject: iio:accel:bmc150-accel: fix counting direction

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.

---
 drivers/iio/accel/bmc150-accel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bmc150-accel.c +1 -1
index 4e70f51c2370..cc5a35750b50 100644
@@ -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;
Signature · 1 line
2.4.6