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/adc/ad7152.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/staging/iio/adc/ad7152.c') diff --git a/drivers/staging/iio/adc/ad7152.c b/drivers/staging/iio/adc/ad7152.c index e53e3e9e586d..7a38bcbbe1af 100644 --- a/drivers/staging/iio/adc/ad7152.c +++ b/drivers/staging/iio/adc/ad7152.c @@ -497,6 +497,10 @@ static const struct attribute_group ad7152_attribute_group = { .attrs = ad7152_attributes, }; +static const struct iio_info ad7152_info = { + .attrs = &ad7152_attribute_group, + .driver_module = THIS_MODULE, +}; /* * device probe and remove */ @@ -525,9 +529,8 @@ static int __devinit ad7152_probe(struct i2c_client *client, /* Echipabilish that the iio_dev is a child of the i2c device */ chip->indio_dev->name = id->name; chip->indio_dev->dev.parent = &client->dev; - chip->indio_dev->attrs = &ad7152_attribute_group; + chip->indio_dev->info = &ad7152_info; chip->indio_dev->dev_data = (void *)(chip); - chip->indio_dev->driver_module = THIS_MODULE; chip->indio_dev->modes = INDIO_DIRECT_MODE; ret = iio_device_register(chip->indio_dev); -- cgit v1.2.3