All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis CIOCCA <denis.ciocca@st.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: "jic23@kernel.org" <jic23@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 1/9] iio:common: Add STMicroelectronics common library
Date: Wed, 16 Jan 2013 17:30:32 +0100	[thread overview]
Message-ID: <50F6D5A8.6050306@st.com> (raw)
In-Reply-To: <50F6B410.6040207@metafoo.de>

Hi Lars-Peter,

thank you very much for your review!

>> +int st_sensors_read_axis_data(struct iio_dev *indio_dev, u8 ch_addr, int *data)
>> +{
>> +	int err;
>> +	u8 outdata[ST_SENSORS_BYTE_FOR_CHANNEL];
>> +	struct st_sensor_data *sdata = iio_priv(indio_dev);
>> +
>> +	err = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev,
>> +			ch_addr, ST_SENSORS_BYTE_FOR_CHANNEL,
>> +						outdata, sdata->multiread_bit);
>> +	if (err < 0)
>> +		goto read_error;
>> +
>> +	*data = ((s16)le16_to_cpup((__le16 *)outdata));
>
> Either make outdata a __le16 or use get_unaligned_le16.

get_unaligned_le16 doesn't do what I have done?


Denis

  reply	other threads:[~2013-01-16 16:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  8:30 iio: STMicroelectronics iio drivers Denis CIOCCA
2013-01-15  8:30 ` [PATCH 1/9] iio:common: Add STMicroelectronics common library Denis CIOCCA
2013-01-16 14:07   ` Lars-Peter Clausen
2013-01-16 16:30     ` Denis CIOCCA [this message]
2013-01-16 17:13       ` Lars-Peter Clausen
2013-01-16 14:18   ` Lars-Peter Clausen
2013-01-15  8:30 ` [PATCH 2/9] iio:accel: Add STMicroelectronics accelerometers driver Denis CIOCCA
2013-01-16 14:28   ` Lars-Peter Clausen
2013-01-16 16:56     ` Denis CIOCCA
2013-01-16 17:16       ` Lars-Peter Clausen
2013-01-15  8:30 ` [PATCH 3/9] iio:gyro: Add STMicroelectronics gyroscopes driver Denis CIOCCA
2013-01-15  8:31 ` [PATCH 4/9] iio:magnetometer: Add STMicroelectronics magnetometers driver Denis CIOCCA
2013-01-15 22:33 ` iio: STMicroelectronics iio drivers Jonathan Cameron
2013-01-15 23:01   ` Jonathan Cameron
2013-01-15 23:06     ` Jonathan Cameron
2013-01-16  8:48     ` Jonathan Cameron
2013-01-16 11:48       ` Denis CIOCCA
2013-01-16 12:25         ` Jonathan Cameron
2013-01-16 13:36           ` Lars-Peter Clausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F6D5A8.6050306@st.com \
    --to=denis.ciocca@st.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.