aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-19 15:29:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-19 15:29:39 -0700
commit922b83b4aaae5d6071a1ede88c04bfa834fa5119 (patch)
treeb4c0a754a74e65b0275a81969191ef42a5770f4b /include
parent9e82bf014195d6f0054982c463575cdce24292be (diff)
parenta31d0928999fbf33b3a6042e8bcb7b7f7e07d094 (diff)
downloadlinux-linaro-stable-922b83b4aaae5d6071a1ede88c04bfa834fa5119.tar.gz
Merge tag 'iio-fixes-3.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: First round of IIO fixes for the 3.17 cycle. * Fix an overwritten error return that can prevent deferred probing when using of_iio_channel_get_by_name * A series that deals with an incorrect reference count when the default trigger is set within the main probe routine for a driver. Can result in a double free if the trigger is changed. * Fix a buglet with xilinx-xadc concerning setup of the address for an aux channel. * At91 adc driver could sometimes get a touchscreen reading rather than the intended adc channel. This is fixed by using the channel data register instead. * Fix some ST magnetometer gain values that differ in production parts from the prerelease ones used for driver development.
Diffstat (limited to 'include')
-rw-r--r--include/linux/iio/trigger.h4
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)
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;
}
/**