mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 08:52:27 +00:00
Add a resource managed devm_iio_device_alloc()/devm_iio_device_free() to automatically clean up any allocations made by IIO drivers, thus leading to simplified IIO drivers code. In addition, this will allow IIO drivers to use other devm_*() API (like devm_request_irq) and don't care about the race between iio_device_free() and the release of resources by Device core during driver removing. Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Oleksandr Kravchenko <[email protected]> Tested-by: Oleksandr Kravchenko <[email protected]> Reviewed-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>