On 09/18/13 22:47, Peter Meerwald wrote: > dev_to_iio_dev() is a false friend > > Signed-off-by: Peter Meerwald <pmeerw@xxxxxxxxxx> > Cc: Oleksandr Kravchenko <o.v.kravchenko@xxxxxxxxxxxxxxx> Applied to the fixes togreg branch of iio.git Thanks > --- > drivers/iio/accel/bma180.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c > index 3eff246..9b0ad23 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; > > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html