Skip to content

Commit

Permalink
staging:iio:triggers reorder module put and device put to ensure that…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Aug 24, 2011
1 parent 5f9c035 commit 82db424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/iio/trigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

/**
Expand Down

0 comments on commit 82db424

Please sign in to comment.