Browse Source

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>
Jonathan Cameron 14 years ago
parent
commit
8016934cbd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/iio/accel/lis3l02dq_core.c

+ 1 - 1
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);