diff options
Diffstat (limited to 'drivers/staging/iio/resolver/ad2s1210.c')
-rw-r--r-- | drivers/staging/iio/resolver/ad2s1210.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index c12f64cc40df..09f4fcfda73a 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -755,6 +755,11 @@ error_ret: return ret; } +static const struct iio_info ad2s1210_info = { + .attrs = &ad2s1210_attribute_group, + .driver_module = THIS_MODULE, +}; + static int __devinit ad2s1210_probe(struct spi_device *spi) { struct ad2s1210_state *st; @@ -800,18 +805,15 @@ static int __devinit ad2s1210_probe(struct spi_device *spi) st->res0 = pins[3]; st->res1 = pins[4]; - 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 = &ad2s1210_attribute_group; + st->idev->info = &ad2s1210_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); |