linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] i2c: pnx: Fix crash due to wrong init of timer->data
@ 2011-04-29 13:30 Wolfram Sang
  0 siblings, 0 replies; only message in thread
From: Wolfram Sang @ 2011-04-29 13:30 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Wolfram Sang, Russell King, Ben Dooks

alg_data is already a pointer which must be passed directly.

Reported-by: Dieter Ripp <ripp-24OduB8/I+bby3iVrkZq2A@public.gmane.org>
Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
---

Ben, will there be another i2c update for 2.6.39? This fixes a crash,
so I think it is even stable-material.

 drivers/i2c/busses/i2c-pnx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 4d2168f..30365f3 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -66,7 +66,7 @@ static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data)
 		jiffies, expires);
 
 	timer->expires = jiffies + expires;
-	timer->data = (unsigned long)&alg_data;
+	timer->data = (unsigned long)alg_data;
 
 	add_timer(timer);
 }
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-29 13:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-29 13:30 [PATCH RESEND] i2c: pnx: Fix crash due to wrong init of timer->data Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).