aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/iio/accel/adis16204_core.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/accel/adis16204_core.c
parenta3f02370c9fa6d85fbee2c11649ebc9c84bae919 (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/accel/adis16204_core.c')
-rw-r--r--drivers/staging/iio/accel/adis16204_core.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/iio/accel/adis16204_core.c b/drivers/staging/iio/accel/adis16204_core.c
index 4e4944cf106..16806704bf4 100644
--- a/drivers/staging/iio/accel/adis16204_core.c
+++ b/drivers/staging/iio/accel/adis16204_core.c
@@ -473,6 +473,13 @@ static const struct attribute_group adis16204_attribute_group = {
.attrs = adis16204_attributes,
};
+static const struct iio_info adis16204_info = {
+ .attrs = &adis16204_attribute_group,
+ .read_raw = &adis16204_read_raw,
+ .write_raw = &adis16204_write_raw,
+ .driver_module = THIS_MODULE,
+};
+
static int __devinit adis16204_probe(struct spi_device *spi)
{
int ret, regdone = 0;
@@ -506,13 +513,10 @@ static int __devinit adis16204_probe(struct spi_device *spi)
st->indio_dev->name = spi->dev.driver->name;
st->indio_dev->dev.parent = &spi->dev;
- st->indio_dev->attrs = &adis16204_attribute_group;
+ st->indio_dev->info = &adis16204_info;
st->indio_dev->channels = adis16204_channels;
st->indio_dev->num_channels = ARRAY_SIZE(adis16204_channels);
- st->indio_dev->read_raw = &adis16204_read_raw;
- st->indio_dev->write_raw = &adis16204_write_raw;
st->indio_dev->dev_data = (void *)(st);
- st->indio_dev->driver_module = THIS_MODULE;
st->indio_dev->modes = INDIO_DIRECT_MODE;
ret = adis16204_configure_ring(st->indio_dev);