From: Jonathan Cameron Date: Wed, 13 Jul 2011 11:51:59 +0000 (+0100) Subject: staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata. X-Git-Tag: next-20110726~5^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8016934cbd0fdf694deee2510650d1f66304f7c3;p=karo-tx-linux.git staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata. This mean all sorts of interesting results on driver removal. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index ba5bc679204f..a29dfd27d440 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c @@ -676,7 +676,7 @@ static int __devinit lis3l02dq_probe(struct spi_device *spi) } st = iio_priv(indio_dev); /* this is only used tor removal purposes */ - spi_set_drvdata(spi, st); + spi_set_drvdata(spi, indio_dev); st->us = spi; mutex_init(&st->buf_lock);