aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/resolver
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-08-30 12:41:18 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-06 16:00:29 -0700
commit3e39440789adef103422ce201538b4da8745fe8e (patch)
tree3cf742695f53ec91f0ff87ab3a9db513383c53ae /drivers/staging/iio/resolver
parentstaging:iio:light:tsl2563 remove unused headers. (diff)
downloadlinux-dev-3e39440789adef103422ce201538b4da8745fe8e.tar.xz
linux-dev-3e39440789adef103422ce201538b4da8745fe8e.zip
staging:iio:fix using iio_priv or iio_dev after iio_unregister_device
This includes calling iio_free_device as that should only be called before the device has been registered. Also one case of iio_free_device being called on a registered device. This has been pulled out of the reworking attributes patch. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/resolver')
-rw-r--r--drivers/staging/iio/resolver/ad2s1210.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index f8459e8e8552..5e83227da4bc 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -784,8 +784,8 @@ static int __devexit ad2s1210_remove(struct spi_device *spi)
{
struct iio_dev *indio_dev = spi_get_drvdata(spi);
struct ad2s1210_state *st = iio_priv(indio_dev);
- iio_device_unregister(indio_dev);
ad2s1210_free_gpios(st);
+ iio_device_unregister(indio_dev);
return 0;
}