diff options
Diffstat (limited to 'drivers/staging/iio/dds/ad9910.c')
-rw-r--r-- | drivers/staging/iio/dds/ad9910.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/iio/dds/ad9910.c b/drivers/staging/iio/dds/ad9910.c index e8fb75cb66ec..97d75d755824 100644 --- a/drivers/staging/iio/dds/ad9910.c +++ b/drivers/staging/iio/dds/ad9910.c @@ -357,6 +357,11 @@ static const struct attribute_group ad9910_attribute_group = { .attrs = ad9910_attributes, }; +static const struct iio_info ad9910_info = { + .attrs = &ad9910_attribute_group, + .driver_module = THIS_MODULE, +}; + static int __devinit ad9910_probe(struct spi_device *spi) { struct ad9910_state *st; @@ -372,18 +377,15 @@ static int __devinit ad9910_probe(struct spi_device *spi) mutex_init(&st->lock); st->sdev = spi; - st->idev = iio_allocate_device(); + st->idev = iio_allocate_device(0); if (st->idev == NULL) { ret = -ENOMEM; goto error_free_st; } st->idev->dev.parent = &spi->dev; - st->idev->num_interrupt_lines = 0; - st->idev->event_attrs = NULL; - st->idev->attrs = &ad9910_attribute_group; + st->idev->info = &ad9910_info; st->idev->dev_data = (void *)(st); - st->idev->driver_module = THIS_MODULE; st->idev->modes = INDIO_DIRECT_MODE; ret = iio_device_register(st->idev); |