Skip to content

Commit

Permalink
iio: Fix bma180 dev-to-indio_dev conversion in suspend/resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Meerwald authored and Jonathan Cameron committed Sep 21, 2013
1 parent d320f1b commit 234efa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/accel/bma180.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 234efa1

Please sign in to comment.