iio: trigger: implement devm_iio_trigger_alloc/devm_iio_triger_free

Add a resource managed devm_iio_trigger_alloc()/devm_iio_triger_free()
to automatically clean up triggers allocated by IIO drivers, thus
leading to simplified IIO drivers code.

Signed-off-by: Jacek Anaszewski <[email protected]>
Signed-off-by: Kyunmin Park <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
Jacek Anaszewski 2013-08-16 14:11:00 +01:00 • committed by Jonathan Cameron
commit d536321df3
3 changed files with 99 additions and 4 deletions

View file

@ -240,6 +240,8 @@ MEM
IIO
devm_iio_device_alloc()
devm_iio_device_free()
devm_iio_trigger_alloc()
devm_iio_trigger_free()
IO region
devm_request_region()