Re: [PATCH 03/18] staging:iio:hmc5843: Add pointer to i2c client to data struct

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

 



>  static int hmc5843_resume(struct device *dev)
>  {
> -	struct i2c_client *client = to_i2c_client(dev);
> -	struct hmc5843_data *data = iio_priv(i2c_get_clientdata(client));
> +	struct hmc5843_data *data = iio_priv(dev_to_iio_dev(dev));
This one has me a little confused.  The dev parameter should I think be the i2c dev here?
If so then dev_to_iio_dev will give th wrong one.
>  
> -	hmc5843_configure(client, data->operating_mode);
> +	hmc5843_configure(data->client, data->operating_mode);
>  
>  	return 0;
>  }
> 
--
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