From: Denis CIOCCA <denis.ciocca@st.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"lee.jones@linaro.org" <lee.jones@linaro.org>
Subject: Re: [PATCH 4/4] iio:press: Register buffer also without specific trigger
Date: Mon, 23 Sep 2013 12:53:36 +0200 [thread overview]
Message-ID: <52401DB0.3070305@st.com> (raw)
In-Reply-To: <523DB27F.2000506@kernel.org>
Thanks Jonathan!
all is fine...;)
Denis
> On 09/18/13 10:00, Denis CIOCCA wrote:
>> This patch fix buffer registration that allows to use generic IIO trigger.
>>
>> Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
> Forward ported and applied to the togreg branch of iio.git Thanks,
>
> Please do confirm I didn't do anything silly, but the port to the code
> Lee updated seemed trivial so I'd rather do it and clear the patches
> out of my queue ;)
>
>> ---
>> drivers/iio/pressure/st_pressure_core.c | 17 ++++++++---------
>> 1 file changed, 8 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
>> index 93bff9b..312a093 100644
>> --- a/drivers/iio/pressure/st_pressure_core.c
>> +++ b/drivers/iio/pressure/st_pressure_core.c
>> @@ -262,11 +262,11 @@ int st_press_common_probe(struct iio_dev *indio_dev,
>> if (err < 0)
>> goto st_press_common_probe_error;
>>
>> - if (pdata->get_irq_data_ready(indio_dev) > 0) {
>> - err = st_press_allocate_ring(indio_dev);
>> - if (err < 0)
>> - goto st_press_common_probe_error;
>> + err = st_press_allocate_ring(indio_dev);
>> + if (err < 0)
>> + goto st_press_common_probe_error;
>>
>> + if (pdata->get_irq_data_ready(indio_dev) > 0) {
>> err = st_sensors_allocate_trigger(indio_dev,
>> ST_PRESS_TRIGGER_OPS);
>> if (err < 0)
>> @@ -283,8 +283,7 @@ st_press_device_register_error:
>> if (pdata->get_irq_data_ready(indio_dev) > 0)
>> st_sensors_deallocate_trigger(indio_dev);
>> st_press_probe_trigger_error:
>> - if (pdata->get_irq_data_ready(indio_dev) > 0)
>> - st_press_deallocate_ring(indio_dev);
>> + st_press_deallocate_ring(indio_dev);
>> st_press_common_probe_error:
>> return err;
>> }
>> @@ -295,10 +294,10 @@ void st_press_common_remove(struct iio_dev *indio_dev)
>> struct st_sensor_data *pdata = iio_priv(indio_dev);
>>
>> iio_device_unregister(indio_dev);
>> - if (pdata->get_irq_data_ready(indio_dev) > 0) {
>> + if (pdata->get_irq_data_ready(indio_dev) > 0)
>> st_sensors_deallocate_trigger(indio_dev);
>> - st_press_deallocate_ring(indio_dev);
>> - }
>> +
>> + st_press_deallocate_ring(indio_dev);
>> }
>> EXPORT_SYMBOL(st_press_common_remove);
>>
>>
next prev parent reply other threads:[~2013-09-23 10:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 9:00 Fix buffers registrations in order to use generic IIO trigger Denis CIOCCA
2013-09-18 9:00 ` [PATCH 1/4] iio:accel: Register buffer also without specific trigger Denis CIOCCA
2013-09-21 14:43 ` Jonathan Cameron
2013-09-18 9:00 ` [PATCH 2/4] iio:gyro: " Denis CIOCCA
2013-09-21 14:50 ` Jonathan Cameron
2013-09-18 9:00 ` [PATCH 3/4] iio:magn: " Denis CIOCCA
2013-09-21 14:50 ` Jonathan Cameron
2013-09-18 9:00 ` [PATCH 4/4] iio:press: " Denis CIOCCA
2013-09-21 14:51 ` Jonathan Cameron
2013-09-23 10:53 ` Denis CIOCCA [this message]
2013-09-18 11:20 ` Fix buffers registrations in order to use generic IIO trigger Lee Jones
2013-09-18 11:32 ` Denis CIOCCA
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=52401DB0.3070305@st.com \
--to=denis.ciocca@st.com \
--cc=jic23@kernel.org \
--cc=lee.jones@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).