summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-07-13 12:51:59 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-18 13:23:57 -0700
commit8016934cbd0fdf694deee2510650d1f66304f7c3 (patch)
tree7c0a1933533c56412d29038249acc1e9038da7a9
parent91ab3fc907ab938b99683dbd8146008d10d09dd8 (diff)
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 <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/iio/accel/lis3l02dq_core.c2
1 files changed, 1 insertions, 1 deletions
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);