From 6fe8135fccd66aedcc55ded70824342587fd2499 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Wed, 18 May 2011 14:42:37 +0100 Subject: staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev. This was suggested by Arnd Bergmann, Other elements may well move in here in future, but it definitely makes sense for these. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/resolver/ad2s120x.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'drivers/staging/iio/resolver/ad2s120x.c') diff --git a/drivers/staging/iio/resolver/ad2s120x.c b/drivers/staging/iio/resolver/ad2s120x.c index e0237ff..f83e142 100644 --- a/drivers/staging/iio/resolver/ad2s120x.c +++ b/drivers/staging/iio/resolver/ad2s120x.c @@ -209,10 +209,14 @@ static struct attribute *ad2s120x_attributes[] = { }; static const struct attribute_group ad2s120x_attribute_group = { - .name = DRV_NAME, .attrs = ad2s120x_attributes, }; +static const struct iio_info ad2s120x_info = { + .attrs = &ad2s120x_attribute_group, + .driver_module = THIS_MODULE, +}; + static int __devinit ad2s120x_probe(struct spi_device *spi) { struct ad2s120x_state *st; @@ -246,12 +250,9 @@ static int __devinit ad2s120x_probe(struct spi_device *spi) goto error_free_st; } st->idev->dev.parent = &spi->dev; - st->idev->num_interrupt_lines = 0; - st->idev->event_attrs = NULL; - st->idev->attrs = &ad2s120x_attribute_group; + st->idev->info = &ad2s120x_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); -- cgit v1.1