summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/dds/ad5930.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-05-18 14:42:37 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-19 16:15:05 -0700
commit6fe8135fccd66aedcc55ded70824342587fd2499 (patch)
tree3afc7acfd0edc052ba93241761e935af9a3b6ebc /drivers/staging/iio/dds/ad5930.c
parenta3f02370c9fa6d85fbee2c11649ebc9c84bae919 (diff)
downloadop-kernel-dev-6fe8135fccd66aedcc55ded70824342587fd2499.zip
op-kernel-dev-6fe8135fccd66aedcc55ded70824342587fd2499.tar.gz
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/dds/ad5930.c')
-rw-r--r--drivers/staging/iio/dds/ad5930.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/iio/dds/ad5930.c b/drivers/staging/iio/dds/ad5930.c
index 5d98f93c..490c363 100644
--- a/drivers/staging/iio/dds/ad5930.c
+++ b/drivers/staging/iio/dds/ad5930.c
@@ -87,6 +87,12 @@ static const struct attribute_group ad5930_attribute_group = {
.attrs = ad5930_attributes,
};
+static const struct iio_info ad5930_info = {
+ .attrs = &ad5930_attribute_group,
+
+ .driver_module = THIS_MODULE,
+};
+
static int __devinit ad5930_probe(struct spi_device *spi)
{
struct ad5930_state *st;
@@ -108,12 +114,8 @@ static int __devinit ad5930_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 = &ad5930_attribute_group;
st->idev->dev_data = (void *)(st);
- st->idev->driver_module = THIS_MODULE;
+ st->idev->info = &ad5930_info;
st->idev->modes = INDIO_DIRECT_MODE;
ret = iio_device_register(st->idev);
OpenPOWER on IntegriCloud