From: Jonathan Cameron <jic23@kernel.org>
To: Varka Bhadram <varkabhadram@gmail.com>, linux-iio@vger.kernel.org
Cc: lars@metafoo.de, Varka Bhadram <varkab@cdac.in>
Subject: Re: [PATCH iio v2 1/3] imu: inv_mpu6050: use devm_iio_trigger_alloc
Date: Mon, 26 Jan 2015 21:15:56 +0000 [thread overview]
Message-ID: <54C6AE8C.6030909@kernel.org> (raw)
In-Reply-To: <1421897884-32663-2-git-send-email-varkab@cdac.in>
On 22/01/15 03:38, Varka Bhadram wrote:
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play with it.
> ---
> drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> index 926fcce..c827d21 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> @@ -116,9 +116,10 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev)
> int ret;
> struct inv_mpu6050_state *st = iio_priv(indio_dev);
>
> - st->trig = iio_trigger_alloc("%s-dev%d",
> - indio_dev->name,
> - indio_dev->id);
> + st->trig = devm_iio_trigger_alloc(&indio_dev->dev,
> + "%s-dev%d",
> + indio_dev->name,
> + indio_dev->id);
> if (st->trig == NULL) {
> ret = -ENOMEM;
> goto error_ret;
> @@ -128,7 +129,7 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev)
> "inv_mpu",
> st->trig);
> if (ret)
> - goto error_free_trig;
> + goto error_ret;
> st->trig->dev.parent = &st->client->dev;
> st->trig->ops = &inv_mpu_trigger_ops;
> iio_trigger_set_drvdata(st->trig, indio_dev);
> @@ -141,8 +142,6 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev)
>
> error_free_irq:
> free_irq(st->client->irq, st->trig);
> -error_free_trig:
> - iio_trigger_free(st->trig);
> error_ret:
> return ret;
> }
> @@ -151,5 +150,4 @@ void inv_mpu6050_remove_trigger(struct inv_mpu6050_state *st)
> {
> iio_trigger_unregister(st->trig);
> free_irq(st->client->irq, st->trig);
> - iio_trigger_free(st->trig);
> }
>
next prev parent reply other threads:[~2015-01-26 21:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 3:38 [PATCH iio v2 0/3] cleanup for InvenSense MPU6050 Varka Bhadram
2015-01-22 3:38 ` [PATCH iio v2 1/3] imu: inv_mpu6050: use devm_iio_trigger_alloc Varka Bhadram
2015-01-26 21:15 ` Jonathan Cameron [this message]
2015-01-22 3:38 ` [PATCH iio v2 2/3] imu: inv_mpu6050: use devm_request_irq Varka Bhadram
2015-01-26 21:16 ` Jonathan Cameron
2015-01-22 3:38 ` [PATCH iio v2 3/3] imu: inv_mpu6050: cleanup on error check Varka Bhadram
2015-01-26 21:17 ` 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=54C6AE8C.6030909@kernel.org \
--to=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=varkab@cdac.in \
--cc=varkabhadram@gmail.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.