diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2014-08-22 21:48:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-05 13:41:04 -0700 |
commit | 1c4442a4ed361b5b3a489d5957c349d2c3cdbce5 (patch) | |
tree | 92c11f0b773b8d6b9a1edd8fcc894cc4e18cc140 | |
parent | c804c77070b537e86e5ecc0dae7df80a1561be67 (diff) | |
download | lwn-1c4442a4ed361b5b3a489d5957c349d2c3cdbce5.tar.gz lwn-1c4442a4ed361b5b3a489d5957c349d2c3cdbce5.zip |
iio:trigger: modify return value for iio_trigger_get
commit f153566570fb9e32c2f59182883f4f66048788fb upstream.
Instead of a void function, return the trigger pointer.
Whilst not in of itself a fix, this makes the following set of
7 fixes cleaner than they would otherwise be.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/linux/iio/trigger.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h index 369cf2cd5144..68f46cd5d514 100644 --- a/include/linux/iio/trigger.h +++ b/include/linux/iio/trigger.h @@ -84,10 +84,12 @@ static inline void iio_trigger_put(struct iio_trigger *trig) put_device(&trig->dev); } -static inline void iio_trigger_get(struct iio_trigger *trig) +static inline struct iio_trigger *iio_trigger_get(struct iio_trigger *trig) { get_device(&trig->dev); __module_get(trig->ops->owner); + + return trig; } /** |