From: Jonathan Cameron <jic23@kernel.org>
To: Sachin Kamat <sachin.kamat@samsung.com>, linux-iio@vger.kernel.org
Cc: spk.linux@gmail.com,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH 6/7] iio: hid-sensor-prox: Fix return values
Date: Sat, 05 Jul 2014 11:11:05 +0100 [thread overview]
Message-ID: <53B7CF39.2070209@kernel.org> (raw)
In-Reply-To: <1404369852-3255-6-git-send-email-sachin.kamat@samsung.com>
On 03/07/14 07:44, Sachin Kamat wrote:
> IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
> the actual return values (which could be -EINVAL) and instead
> returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
> obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
> upon success.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Applied to the fixes-togreg branch of iio.git
Thanks,
> ---
> drivers/iio/light/hid-sensor-prox.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
> index d203ef4..412bae8 100644
> --- a/drivers/iio/light/hid-sensor-prox.c
> +++ b/drivers/iio/light/hid-sensor-prox.c
> @@ -74,7 +74,6 @@ static int prox_read_raw(struct iio_dev *indio_dev,
> struct prox_state *prox_state = iio_priv(indio_dev);
> int report_id = -1;
> u32 address;
> - int ret;
> int ret_type;
> s32 poll_value;
>
> @@ -125,14 +124,12 @@ static int prox_read_raw(struct iio_dev *indio_dev,
> ret_type = IIO_VAL_INT;
> break;
> case IIO_CHAN_INFO_SAMP_FREQ:
> - ret = hid_sensor_read_samp_freq_value(
> + ret_type = hid_sensor_read_samp_freq_value(
> &prox_state->common_attributes, val, val2);
> - ret_type = IIO_VAL_INT_PLUS_MICRO;
> break;
> case IIO_CHAN_INFO_HYSTERESIS:
> - ret = hid_sensor_read_raw_hyst_value(
> + ret_type = hid_sensor_read_raw_hyst_value(
> &prox_state->common_attributes, val, val2);
> - ret_type = IIO_VAL_INT_PLUS_MICRO;
> break;
> default:
> ret_type = -EINVAL;
>
next prev parent reply other threads:[~2014-07-05 10:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 6:44 [PATCH 1/7] iio: hid-sensor-press: Fix return values Sachin Kamat
2014-07-03 6:44 ` [PATCH 2/7] iio: hid-sensor-accel-3d: " Sachin Kamat
2014-07-05 10:09 ` Jonathan Cameron
2014-07-03 6:44 ` [PATCH 3/7] iio: hid-sensor-magn-3d: " Sachin Kamat
2014-07-05 10:09 ` Jonathan Cameron
2014-07-03 6:44 ` [PATCH 4/7] iio: hid-sensor-als: " Sachin Kamat
2014-07-05 10:10 ` Jonathan Cameron
2014-07-03 6:44 ` [PATCH 5/7] iio: hid-sensor-gyro-3d: " Sachin Kamat
2014-07-05 10:10 ` Jonathan Cameron
2014-07-03 6:44 ` [PATCH 6/7] iio: hid-sensor-prox: " Sachin Kamat
2014-07-05 10:11 ` Jonathan Cameron [this message]
2014-07-03 6:44 ` [PATCH 7/7] iio: hid-sensors: Fix compilation warning Sachin Kamat
2014-07-05 10:21 ` Jonathan Cameron
2014-07-03 23:01 ` [PATCH 1/7] iio: hid-sensor-press: Fix return values Srinivas Pandruvada
2014-07-04 5:51 ` Jonathan Cameron
2014-07-05 10:08 ` 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=53B7CF39.2070209@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=sachin.kamat@samsung.com \
--cc=spk.linux@gmail.com \
--cc=srinivas.pandruvada@linux.intel.com \
/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.