diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2020-06-03 14:40:19 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-06-14 11:49:57 +0100 |
commit | f5d017938e7a6517b85f7fd215213a28e11291fb (patch) | |
tree | ab7554530515b5fdc44fd8980fd792afee0ce330 /drivers/counter | |
parent | 78289b4a58b58e9a8a76ef43ffbaf04a097e33c6 (diff) |
iio: core: add iio_device_set_parent() helper
By default, the device allocation will also assign a parent device to the
IIO device object. In cases where devm_iio_device_alloc() is used,
sometimes the parent device must be different than the device used to
manage the allocation.
In that case, this helper should be used to change the parent, hence the
requirement to call this between allocation & registration.
This pattern/requirement is not very common in the IIO space, and it may be
cleaned up later.
But until then, assigning the parent manually between allocation &
registration is slightly easier.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/counter')
0 files changed, 0 insertions, 0 deletions