diff options
author | Jonathan Cameron | 2011-08-24 18:28:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-08-24 23:23:41 +0200 |
commit | 82db4249a2bd8b19c734e1ec4db0d6a56849b9a0 (patch) | |
tree | d99cd5fb5c49789a0ed7a5e5d01c6f0ea4e99f98 /drivers | |
parent | staging:iio:triggers. Add a reference get to the core for triggers. (diff) | |
download | kernel-qcow2-linux-82db4249a2bd8b19c734e1ec4db0d6a56849b9a0.tar.gz kernel-qcow2-linux-82db4249a2bd8b19c734e1ec4db0d6a56849b9a0.tar.xz kernel-qcow2-linux-82db4249a2bd8b19c734e1ec4db0d6a56849b9a0.zip |
staging:iio:triggers reorder module put and device put to ensure that the ops are still there if put results in device deletion.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/trigger.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/trigger.h b/drivers/staging/iio/trigger.h index 325e086e9e68..234c77433434 100644 --- a/drivers/staging/iio/trigger.h +++ b/drivers/staging/iio/trigger.h @@ -104,14 +104,14 @@ static inline struct iio_trigger *to_iio_trigger(struct device *d) static inline void iio_put_trigger(struct iio_trigger *trig) { - put_device(&trig->dev); module_put(trig->ops->owner); + put_device(&trig->dev); }; static inline void iio_get_trigger(struct iio_trigger *trig) { - __module_get(trig->ops->owner); get_device(&trig->dev); + __module_get(trig->ops->owner); }; /** |