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>
This commit is contained in:
Peter Meerwald 2013-09-18 22:47:00 +01:00 коммит произвёл Jonathan Cameron
Родитель d320f1b481
Коммит 234efa1703
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -620,7 +620,7 @@ static int bma180_remove(struct i2c_client *client)
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int bma180_suspend(struct device *dev) 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); struct bma180_data *data = iio_priv(indio_dev);
int ret; int ret;
@ -633,7 +633,7 @@ static int bma180_suspend(struct device *dev)
static int bma180_resume(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); struct bma180_data *data = iio_priv(indio_dev);
int ret; int ret;