diff options
| author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-29 07:39:00 -0400 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2013-11-24 16:07:09 -0500 |
| commit | 8caa07c0e565a15f49f290ca4c6a3adf968ddd38 (patch) | |
| tree | f01931c1686fb622b31f3d01cbe77c85830109d6 /include/linux/iio | |
| parent | 2461fc9f3f45828eee23dd5018e7b5576aceec80 (diff) | |
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>
Diffstat (limited to 'include/linux/iio')
| -rw-r--r-- | include/linux/iio/iio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 256a90a1bea6..a8cabda4d108 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
| @@ -510,6 +510,9 @@ int iio_device_register(struct iio_dev *indio_dev); | |||
| 510 | **/ | 510 | **/ |
| 511 | void iio_device_unregister(struct iio_dev *indio_dev); | 511 | void iio_device_unregister(struct iio_dev *indio_dev); |
| 512 | 512 | ||
| 513 | int devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev); | ||
| 514 | void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); | ||
| 515 | |||
| 513 | /** | 516 | /** |
| 514 | * iio_push_event() - try to add event to the list for userspace reading | 517 | * iio_push_event() - try to add event to the list for userspace reading |
| 515 | * @indio_dev: IIO device structure | 518 | * @indio_dev: IIO device structure |
