Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1239106
| From | Lars-Peter Clausen <lars@metafoo.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Staging: iio: meter: Use devm functions |
| Date | 2015-10-04 14:10 +0200 |
| Message-ID | <qfQh3-8jP-3@gated-at.bofh.it> (permalink) |
| References | <qfJfz-6Bs-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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);
[...]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Staging: iio: meter: Use devm functions Shraddha Barke <shraddha.6596@gmail.com> - 2015-10-04 06:40 +0200
Re: [PATCH] Staging: iio: meter: Use devm functions Lars-Peter Clausen <lars@metafoo.de> - 2015-10-04 14:10 +0200
Re: [PATCH] Staging: iio: meter: Use devm functions Jonathan Cameron <jic23@kernel.org> - 2015-10-04 14:10 +0200
Re: [PATCH] Staging: iio: meter: Use devm functions Shraddha Barke <shraddha.6596@gmail.com> - 2015-10-04 14:50 +0200
Re: [PATCH] Staging: iio: meter: Use devm functions Jonathan Cameron <jic23@kernel.org> - 2015-10-04 16:40 +0200
csiph-web