diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-05-18 14:42:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-19 16:15:05 -0700 |
commit | 6fe8135fccd66aedcc55ded70824342587fd2499 (patch) | |
tree | 3afc7acfd0edc052ba93241761e935af9a3b6ebc /drivers/staging/iio/adc/ad7291.c | |
parent | a3f02370c9fa6d85fbee2c11649ebc9c84bae919 (diff) |
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 <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/adc/ad7291.c')
-rw-r--r-- | drivers/staging/iio/adc/ad7291.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c index 0e4c7283bb07..1be3453479b7 100644 --- a/drivers/staging/iio/adc/ad7291.c +++ b/drivers/staging/iio/adc/ad7291.c @@ -778,6 +778,12 @@ static struct attribute_group ad7291_event_attribute_group = { .attrs = ad7291_event_attributes, }; +static const struct iio_info ad7291_info = { + .attrs = &ad7291_attribute_group, + .num_interrupt_lines = 1, + .event_attrs = &ad7291_event_attribute_group, +}; + /* * device probe and remove */ @@ -807,11 +813,8 @@ static int __devinit ad7291_probe(struct i2c_client *client, chip->indio_dev->name = id->name; chip->indio_dev->dev.parent = &client->dev; - chip->indio_dev->attrs = &ad7291_attribute_group; - chip->indio_dev->event_attrs = &ad7291_event_attribute_group; + chip->indio_dev->info = &ad7291_info; chip->indio_dev->dev_data = (void *)chip; - chip->indio_dev->driver_module = THIS_MODULE; - chip->indio_dev->num_interrupt_lines = 1; chip->indio_dev->modes = INDIO_DIRECT_MODE; ret = iio_device_register(chip->indio_dev); |