- st->indio_dev = iio_allocate_device(0);
- if (st->indio_dev == NULL) {
- ret = -ENOMEM;
- goto error_disable_reg;
- }
-
- st->indio_dev->dev.parent = dev;
- st->indio_dev->attrs = &ad7606_attribute_group;
- st->indio_dev->dev_data = (void *)(st);
- st->indio_dev->driver_module = THIS_MODULE;
- st->indio_dev->modes = INDIO_DIRECT_MODE;
- st->indio_dev->name = st->chip_info->name;
- st->indio_dev->channels = st->chip_info->channels;
- st->indio_dev->num_channels = st->chip_info->num_channels;
- st->indio_dev->read_raw = &ad7606_read_raw;
+ indio_dev->dev.parent = dev;
+ indio_dev->attrs = &ad7606_attribute_group;
+ indio_dev->dev_data = (void *)(st);
+ indio_dev->driver_module = THIS_MODULE;
+ indio_dev->modes = INDIO_DIRECT_MODE;
+ indio_dev->name = st->chip_info->name;
+ indio_dev->channels = st->chip_info->channels;
+ indio_dev->num_channels = st->chip_info->num_channels;
+ indio_dev->read_raw = &ad7606_read_raw;