diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2014-08-22 16:48:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-08-25 16:47:22 -0400 |
commit | f153566570fb9e32c2f59182883f4f66048788fb (patch) | |
tree | 3bc4f70c47177645728cf863ac6653a5a8f68423 /include/linux | |
parent | 872687f626e033b4ddfaec1e410057cfc6636d77 (diff) |
iio:trigger: modify return value for iio_trigger_get
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>
Cc: Stable@vger.kernel.org
Diffstat (limited to 'include/linux')
-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 4b79ffe7b188..fa76c79a52a1 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) | |||
84 | put_device(&trig->dev); | 84 | put_device(&trig->dev); |
85 | } | 85 | } |
86 | 86 | ||
87 | static inline void iio_trigger_get(struct iio_trigger *trig) | 87 | static inline struct iio_trigger *iio_trigger_get(struct iio_trigger *trig) |
88 | { | 88 | { |
89 | get_device(&trig->dev); | 89 | get_device(&trig->dev); |
90 | __module_get(trig->ops->owner); | 90 | __module_get(trig->ops->owner); |
91 | |||
92 | return trig; | ||
91 | } | 93 | } |
92 | 94 | ||
93 | /** | 95 | /** |