Skip to content

Commit

Permalink
iio:trigger: modify return value for iio_trigger_get
Browse files Browse the repository at this point in the history
Instead of a void function, return the trigger pointer.

Whilst not in of itself a fix, this makes the following set of
7 fixes cleaner than they would otherwise be.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Stable@vger.kernel.org
  • Loading branch information
Srinivas Pandruvada authored and Jonathan Cameron committed Aug 25, 2014
1 parent 872687f commit f153566
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/iio/trigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@ static inline void iio_trigger_put(struct iio_trigger *trig)
put_device(&trig->dev);
}

static inline void iio_trigger_get(struct iio_trigger *trig)
static inline struct iio_trigger *iio_trigger_get(struct iio_trigger *trig)
{
get_device(&trig->dev);
__module_get(trig->ops->owner);

return trig;
}

/**
Expand Down

0 comments on commit f153566

Please sign in to comment.