diff options
Diffstat (limited to 'drivers/staging/iio/dds/ad9951.c')
-rw-r--r-- | drivers/staging/iio/dds/ad9951.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/iio/dds/ad9951.c b/drivers/staging/iio/dds/ad9951.c index 57eddf6d4713..d4dfcd41d5f9 100644 --- a/drivers/staging/iio/dds/ad9951.c +++ b/drivers/staging/iio/dds/ad9951.c @@ -166,6 +166,11 @@ static const struct attribute_group ad9951_attribute_group = { .attrs = ad9951_attributes, }; +static const struct iio_info ad9951_info = { + .attrs = &ad9951_attribute_group, + .driver_module = THIS_MODULE, +}; + static int __devinit ad9951_probe(struct spi_device *spi) { struct ad9951_state *st; @@ -181,18 +186,15 @@ static int __devinit ad9951_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 = &ad9951_attribute_group; + st->idev->info = &ad9951_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); |