diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2013-09-19 01:47:00 +0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-21 15:04:34 +0400 |
commit | 234efa1703ade3dc57a520829176378b26e831e0 (patch) | |
tree | d028caf74c04da8e6039a8bb0b15da0e4260d866 /drivers/iio/accel | |
parent | d320f1b4811564052d5e3496a807a68c5ade791d (diff) | |
download | linux-234efa1703ade3dc57a520829176378b26e831e0.tar.xz |
iio: Fix bma180 dev-to-indio_dev conversion in suspend/resume
dev_to_iio_dev() is a false friend
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r-- | drivers/iio/accel/bma180.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 12e32e6b4103..81e3dc260993 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -620,7 +620,7 @@ static int bma180_remove(struct i2c_client *client) #ifdef CONFIG_PM_SLEEP static int bma180_suspend(struct device *dev) { - struct iio_dev *indio_dev = dev_to_iio_dev(dev); + struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev)); struct bma180_data *data = iio_priv(indio_dev); int ret; @@ -633,7 +633,7 @@ static int bma180_suspend(struct device *dev) static int bma180_resume(struct device *dev) { - struct iio_dev *indio_dev = dev_to_iio_dev(dev); + struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev)); struct bma180_data *data = iio_priv(indio_dev); int ret; |