Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Srinivas Pandruvada and committed by
Jonathan Cameron
f1535665 872687f6

+3 -1
+3 -1
include/linux/iio/trigger.h
··· 84 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 89 get_device(&trig->dev); 90 90 __module_get(trig->ops->owner); 91 + 92 + return trig; 91 93 } 92 94 93 95 /**