diff options
Diffstat (limited to 'drivers/staging/iio/dds/ad5930.c')
-rw-r--r-- | drivers/staging/iio/dds/ad5930.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/staging/iio/dds/ad5930.c b/drivers/staging/iio/dds/ad5930.c index f80039c5d539..490c3637bc8e 100644 --- a/drivers/staging/iio/dds/ad5930.c +++ b/drivers/staging/iio/dds/ad5930.c @@ -87,6 +87,12 @@ static const struct attribute_group ad5930_attribute_group = { .attrs = ad5930_attributes, }; +static const struct iio_info ad5930_info = { + .attrs = &ad5930_attribute_group, + + .driver_module = THIS_MODULE, +}; + static int __devinit ad5930_probe(struct spi_device *spi) { struct ad5930_state *st; @@ -102,18 +108,14 @@ static int __devinit ad5930_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 = &ad5930_attribute_group; st->idev->dev_data = (void *)(st); - st->idev->driver_module = THIS_MODULE; + st->idev->info = &ad5930_info; st->idev->modes = INDIO_DIRECT_MODE; ret = iio_device_register(st->idev); |