diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-05-18 13:42:37 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-19 23:15:05 (GMT) |
commit | 6fe8135fccd66aedcc55ded70824342587fd2499 (patch) | |
tree | 3afc7acfd0edc052ba93241761e935af9a3b6ebc /drivers/staging/iio/meter/ade7854.c | |
parent | a3f02370c9fa6d85fbee2c11649ebc9c84bae919 (diff) | |
download | linux-6fe8135fccd66aedcc55ded70824342587fd2499.tar.xz |
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/meter/ade7854.c')
-rw-r--r-- | drivers/staging/iio/meter/ade7854.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/iio/meter/ade7854.c b/drivers/staging/iio/meter/ade7854.c index d3f1df7..44cd3ec 100644 --- a/drivers/staging/iio/meter/ade7854.c +++ b/drivers/staging/iio/meter/ade7854.c @@ -551,6 +551,11 @@ static const struct attribute_group ade7854_attribute_group = { .attrs = ade7854_attributes, }; +static const struct iio_info ade7854_info = { + .attrs = &ade7854_attribute_group, + .driver_module = THIS_MODULE, +}; + int ade7854_probe(struct ade7854_state *st, struct device *dev) { int ret; @@ -575,9 +580,8 @@ int ade7854_probe(struct ade7854_state *st, struct device *dev) } st->indio_dev->dev.parent = dev; - st->indio_dev->attrs = &ade7854_attribute_group; + st->indio_dev->info = &ade7854_info; st->indio_dev->dev_data = (void *)(st); - st->indio_dev->driver_module = THIS_MODULE; st->indio_dev->modes = INDIO_DIRECT_MODE; ret = iio_device_register(st->indio_dev); |