summaryrefslogtreecommitdiff
path: root/drivers/iio/common
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2021-04-26 18:49:03 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 13:49:13 +0100
commit15ea2878bfb255099092634d28f31177f237ccd7 (patch)
tree5dad7386052e103370ac33add69795274c362fb9 /drivers/iio/common
parente6cc8f2b7616f9d85e281d903f82d6f99819cd08 (diff)
iio: core: move @id from struct iio_dev to struct iio_dev_opaque
Continuing from Alexandru Ardelean's introduction of the split between driver modifiable fields and those that should only be set by the core. This could have been done in two steps to make the actual move after introducing iio_device_id() but there seemed limited point to that given how mechanical the majority of the patch is. Includes fixup from Alex for missing mxs-lradc-adc conversion. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210426174911.397061-2-jic23@kernel.org
Diffstat (limited to 'drivers/iio/common')
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-trigger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index 95ddccb44f1c..5a7b3e253e58 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -256,7 +256,7 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
}
trig = iio_trigger_alloc(indio_dev->dev.parent,
- "%s-dev%d", name, indio_dev->id);
+ "%s-dev%d", name, iio_device_id(indio_dev));
if (trig == NULL) {
dev_err(&indio_dev->dev, "Trigger Allocate Failed\n");
ret = -ENOMEM;