On 22/08/14 21:48, Srinivas Pandruvada wrote: > This can result in wrong reference count for trigger device, call > iio_trigger_get to increment reference. > Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion > with Jonathan. > > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> Applied to the fixes-togreg branch of iio.git Thanks, > --- > drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c > index a3109a6..92068cd 100644 > --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c > +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c > @@ -122,7 +122,8 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, > dev_err(&indio_dev->dev, "Trigger Register Failed\n"); > goto error_free_trig; > } > - indio_dev->trig = attrb->trigger = trig; > + attrb->trigger = trig; > + indio_dev->trig = iio_trigger_get(trig); > > return ret; > > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html