提交 82db4249 编写于 作者: J Jonathan Cameron 提交者: Greg Kroah-Hartman

staging:iio:triggers reorder module put and device put to ensure that the ops...

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: NJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5f9c035c
......@@ -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);
};
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册