From: Lars-Peter Clausen <lars@metafoo.de>
To: Shraddha Barke <shraddha.6596@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Michael Hennerich <Michael.Hennerich@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: iio: meter: Use devm functions
Date: Sun, 04 Oct 2015 14:04:31 +0200 [thread overview]
Message-ID: <561115CF.9020006@metafoo.de> (raw)
In-Reply-To: <1443933272-23398-1-git-send-email-shraddha.6596@gmail.com>
On 10/04/2015 06:34 AM, Shraddha Barke wrote:
> [...]
Hi,
Thanks for the patch.
> - st->trig = iio_trigger_alloc("%s-dev%d",
> - spi_get_device_id(st->us)->name,
> - indio_dev->id);
> + st->trig = devm_iio_trigger_alloc(&indio_dev->id, "%s-dev%d",
But I don't think this compiles. The first parameter needs to be a struct
device.
> + spi_get_device_id(st->us)->name,
> + indio_dev->id);
> if (!st->trig) {
> ret = -ENOMEM;
> goto error_ret;
> }
>
> - ret = request_irq(st->us->irq,
> - ade7758_data_rdy_trig_poll,
> - IRQF_TRIGGER_LOW,
> - spi_get_device_id(st->us)->name,
> - st->trig);
> + ret = devm_request_irq(&indio_dev->dev, st->us->irq,
And the device also needs to be the device from whose probe function this is
called. Please add a parameter to ade7758_probe_trigger that supplies this
device.
> + ade7758_data_rdy_trig_poll,
> + IRQF_TRIGGER_LOW,
> + spi_get_device_id(st->us)->name,
> + st->trig);
[...]
next prev parent reply other threads:[~2015-10-04 12:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-04 4:34 [PATCH] Staging: iio: meter: Use devm functions Shraddha Barke
2015-10-04 12:04 ` Lars-Peter Clausen [this message]
2015-10-04 12:06 ` Jonathan Cameron
2015-10-04 12:43 ` Shraddha Barke
2015-10-04 14:35 ` 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=561115CF.9020006@metafoo.de \
--to=lars@metafoo.de \
--cc=Michael.Hennerich@analog.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shraddha.6596@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.