From: Jonathan Cameron <jic23@kernel.org>
To: Denis CIOCCA <denis.ciocca@st.com>
Cc: lars@metafoo.de, linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/4] iio:common: Add STMicroelectronics common library
Date: Sat, 12 Jan 2013 21:59:17 +0000 [thread overview]
Message-ID: <50F1DCB5.5030003@kernel.org> (raw)
In-Reply-To: <1357733221-6248-2-git-send-email-denis.ciocca@st.com>
...
> +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;
> +
If you want to keep the cast this way around, then make
it __le16 instead of u16. Personally I'd make outdata a __le16
array and then do the cast the other way, but it is far from important.
> + *data = ((s16)le16_to_cpup((u16 *)outdata));
> +
> +read_error:
> + return err;
> +}
> +EXPORT_SYMBOL(st_sensors_read_axis_data);
...
next prev parent reply other threads:[~2013-01-12 21:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 12:06 iio: STMicroelectronics iio drivers bugfix Denis CIOCCA
2013-01-09 12:06 ` [PATCH 1/4] iio:common: Add STMicroelectronics common library Denis CIOCCA
2013-01-12 21:59 ` Jonathan Cameron [this message]
2013-01-09 12:06 ` [PATCH 2/4] iio:accel: Add STMicroelectronics accelerometers driver Denis CIOCCA
2013-01-09 12:07 ` [PATCH 3/4] iio:gyro: Add STMicroelectronics gyroscopes driver Denis CIOCCA
2013-01-09 12:07 ` [PATCH 4/4] iio:magnetometer: Add STMicroelectronics magnetometers driver Denis CIOCCA
2013-01-12 22:02 ` iio: STMicroelectronics iio drivers bugfix Jonathan Cameron
2013-01-12 22:20 ` Denis Ciocca
-- strict thread matches above, loose matches on Subject: below --
2013-01-25 23:44 STMicroelectronics IIO driver Denis Ciocca
2013-01-25 23:44 ` [PATCH 1/4] iio:common: Add STMicroelectronics common library Denis Ciocca
2013-01-29 21:45 ` Lars-Peter Clausen
2013-01-21 8:36 STMicroelectronics driver kconfig-makefile bugfix Denis CIOCCA
2013-01-21 8:36 ` [PATCH 1/4] iio:common: Add STMicroelectronics common library Denis CIOCCA
2013-01-22 16:15 ` Jonathan Cameron
2013-01-23 9:33 ` Lars-Peter Clausen
2013-01-18 16:58 STMicroelectronics drivers Denis CIOCCA
2013-01-18 16:58 ` [PATCH 1/4] iio:common: Add STMicroelectronics common library Denis CIOCCA
2013-01-18 9:31 STMicroelectronics drivers bugfix Denis CIOCCA
2013-01-18 9:31 ` [PATCH 1/4] iio:common: Add STMicroelectronics common library Denis CIOCCA
2013-01-08 16:30 iio: STMicroelectronics iio drivers Denis CIOCCA
2013-01-08 16:30 ` [PATCH 1/4] iio:common: Add STMicroelectronics common library Denis CIOCCA
2012-12-13 13:11 STMicroelectronics sensors driver Denis CIOCCA
2012-12-13 13:11 ` [PATCH 1/4] iio:common: Add STMicroelectronics common library Denis CIOCCA
2012-12-16 12:15 ` Jonathan Cameron
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=50F1DCB5.5030003@kernel.org \
--to=jic23@kernel.org \
--cc=denis.ciocca@st.com \
--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.