IIO: hw_consumer: add devm_iio_hw_consumer_alloc
authorArnaud Pouliquen <arnaud.pouliquen@st.com>
Wed, 10 Jan 2018 10:13:05 +0000 (11:13 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 10 Jan 2018 10:30:07 +0000 (10:30 +0000)
commitb688c18d30060e8a840d8af72790339c72acdac4
treee2b9cd9b33b3db05d5836413ff374c556c72be77
parent5b178943d64b85d78350ea9c86344c376d7bfe74
IIO: hw_consumer: add devm_iio_hw_consumer_alloc

Add devm_iio_hw_consumer_alloc function that calls iio_hw_consumer_free
when the device is unbound from the bus.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/iio/buffer/industrialio-hw-consumer.c
include/linux/iio/hw-consumer.h