]> git.baikalelectronics.ru Git - kernel.git/commit
iio:trigger: Add helper function to verify that a trigger belongs to the same device
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 23 Sep 2016 15:19:41 +0000 (17:19 +0200)
committerJonathan Cameron <jic23@kernel.org>
Tue, 27 Sep 2016 19:32:55 +0000 (20:32 +0100)
commit79af251e9126cb99f03a8264fffd0273976f5416
tree00290483da0ec9100df02fb4a65f04ea47170212
parent88a195fac13635b712fa03149fbfee252136e912
iio:trigger: Add helper function to verify that a trigger belongs to the same device

Some triggers can only be attached to the IIO device that corresponds to
the same physical device. Currently each driver that requires this
implements its own trigger validation function.

Introduce a new helper function called iio_trigger_validate_own_device()
that can be used to do this check. Having a common implementation avoids
code duplication and unnecessary boiler-plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-trigger.c
include/linux/iio/trigger.h