summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/cros_ec_accel_legacy.c
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2020-06-03 13:40:19 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-06-14 12:49:57 +0200
commitf5d017938e7a6517b85f7fd215213a28e11291fb (patch)
treeab7554530515b5fdc44fd8980fd792afee0ce330 /drivers/iio/accel/cros_ec_accel_legacy.c
parentiio: core: pass parent device as parameter during allocation (diff)
downloadlinux-f5d017938e7a6517b85f7fd215213a28e11291fb.tar.xz
linux-f5d017938e7a6517b85f7fd215213a28e11291fb.zip
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/iio/accel/cros_ec_accel_legacy.c')
0 files changed, 0 insertions, 0 deletions