Re: [PATCH 4/4] iio: Fix tcs3472 dev-to-indio_dev conversion in suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/18/13 22:47, Peter Meerwald wrote:
> dev_to_iio_dev() is a false friend
> 
> Signed-off-by: Peter Meerwald <pmeerw@xxxxxxxxxx>
Applied to the togreg branch of iio.git

Thanks
> ---
>  drivers/iio/light/tcs3472.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c
> index 7bf2969..0b4ed57 100644
> --- a/drivers/iio/light/tcs3472.c
> +++ b/drivers/iio/light/tcs3472.c
> @@ -330,12 +330,15 @@ static int tcs3472_remove(struct i2c_client *client)
>  #ifdef CONFIG_PM_SLEEP
>  static int tcs3472_suspend(struct device *dev)
>  {
> -	return tcs3472_powerdown(iio_priv(dev_to_iio_dev(dev)));
> +	struct tcs3472_data *data = iio_priv(i2c_get_clientdata(
> +		to_i2c_client(dev)));
> +	return tcs3472_powerdown(data);
>  }
>  
>  static int tcs3472_resume(struct device *dev)
>  {
> -	struct tcs3472_data *data = iio_priv(dev_to_iio_dev(dev));
> +	struct tcs3472_data *data = iio_priv(i2c_get_clientdata(
> +		to_i2c_client(dev)));
>  	return i2c_smbus_write_byte_data(data->client, TCS3472_ENABLE,
>  		data->enable | (TCS3472_ENABLE_AEN | TCS3472_ENABLE_PON));
>  }
> 
--
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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux