lkml.org 
[lkml]   [2015]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging: iio: meter: Use devm functions
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);
[...]


\
 
 \ /
  Last update: 2015-10-04 14:21    [W:0.076 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site