summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/dds/ad9832.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-05-18 13:42:37 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-19 23:15:05 (GMT)
commit6fe8135fccd66aedcc55ded70824342587fd2499 (patch)
tree3afc7acfd0edc052ba93241761e935af9a3b6ebc /drivers/staging/iio/dds/ad9832.c
parenta3f02370c9fa6d85fbee2c11649ebc9c84bae919 (diff)
downloadlinux-fsl-qoriq-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/dds/ad9832.c')
-rw-r--r--drivers/staging/iio/dds/ad9832.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/iio/dds/ad9832.c b/drivers/staging/iio/dds/ad9832.c
index 4b5721c..e8fe142 100644
--- a/drivers/staging/iio/dds/ad9832.c
+++ b/drivers/staging/iio/dds/ad9832.c
@@ -195,6 +195,11 @@ static const struct attribute_group ad9832_attribute_group = {
.attrs = ad9832_attributes,
};
+static const struct iio_info ad9832_info = {
+ .attrs = &ad9832_attribute_group,
+ .driver_module = THIS_MODULE,
+};
+
static int __devinit ad9832_probe(struct spi_device *spi)
{
struct ad9832_platform_data *pdata = spi->dev.platform_data;
@@ -232,9 +237,8 @@ static int __devinit ad9832_probe(struct spi_device *spi)
st->indio_dev->dev.parent = &spi->dev;
st->indio_dev->name = spi_get_device_id(spi)->name;
- st->indio_dev->attrs = &ad9832_attribute_group;
+ st->indio_dev->info = &ad9832_info;
st->indio_dev->dev_data = (void *) st;
- st->indio_dev->driver_module = THIS_MODULE;
st->indio_dev->modes = INDIO_DIRECT_MODE;
/* Setup default messages */