iio: meter: ade7758: Fix indio_dev->trig assignment
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Fri, 22 Aug 2014 20:48:00 +0000 (21:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:54:11 +0000 (14:54 -0700)
commite3675a4bd5f72e2551a4f4dfae7330c8b6c854dd
tree5540094b335998670a62322dcb771facd669ff89
parentcde9b0d1ec4f85fa3602a158c2e3ee5e6d6b925d
iio: meter: ade7758: Fix indio_dev->trig assignment

commit 0495081179212b758775df752e657ea71dcae020 upstream.

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@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/meter/ade7758_trigger.c