mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
iio: core: Implement devm_iio_device_{register,unregister}
Add device managed devm_iio_device_{register,unregister}() to automatically unregister IIO drivers thus leading to simplified IIO driver code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
2461fc9f3f
commit
8caa07c0e5
3 changed files with 64 additions and 0 deletions
|
@ -510,6 +510,9 @@ int iio_device_register(struct iio_dev *indio_dev);
|
|||
**/
|
||||
void iio_device_unregister(struct iio_dev *indio_dev);
|
||||
|
||||
int devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev);
|
||||
void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev);
|
||||
|
||||
/**
|
||||
* iio_push_event() - try to add event to the list for userspace reading
|
||||
* @indio_dev: IIO device structure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue