From: Jonathan Cameron Date: Wed, 24 Aug 2011 16:28:34 +0000 (+0100) Subject: staging:iio:triggers reorder module put and device put to ensure that the ops are... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=82db4249a2bd8b19c734e1ec4db0d6a56849b9a0;p=mv-sheeva.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/trigger.h b/drivers/staging/iio/trigger.h index 325e086e9e6..234c7743343 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); }; /**