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>
This commit is contained in:
Jonathan Cameron 2011-08-24 17:28:34 +01:00 committed by Greg Kroah-Hartman
parent 5f9c035cae
commit 82db4249a2
1 changed files with 2 additions and 2 deletions

View File

@ -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);
};
/**