Skip to contentSkip to conversation

iio: industrialio-trigger: set iio_poll_func private_data

PATCH In review [email protected] 2 participants 2 messages May 25, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: industrialio-trigger: set iio_poll_func private_data

From: Michael Hennerich <[email protected]>

Failure to set iio_poll_func private_data, causes zero pointer access violations in all consumer trigger handlers.

---
 drivers/staging/iio/industrialio-trigger.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/iio/industrialio-trigger.c +1 -0
index 6159023..d504aa2 100644
@@ -294,6 +294,7 @@ struct iio_poll_func
 	pf->h = h;
 	pf->thread = thread;
 	pf->type = type;
+	pf->private_data = private;
 
 	return pf;
 }
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · On 05/25/11 11:39, [email protected] wrote:

From: Michael Hennerich <[email protected]>

Failure to set iio_poll_func private_data, causes zero pointer access violations in all consumer trigger handlers.

Yikes. Good spot. Not one of my better bits of refactoring. Strange thing is I could have sworn I tested that, but it clearly won't work without your fix..

Quoted 2 lines
Quoted 16 lines
---
 drivers/staging/iio/industrialio-trigger.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/iio/industrialio-trigger.c +1 -0
index 6159023..d504aa2 100644
@@ -294,6 +294,7 @@ struct iio_poll_func
 	pf->h = h;
 	pf->thread = thread;
 	pf->type = type;
+	pf->private_data = private;
 
 	return pf;
 }