summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/imu
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/imu
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/imu')
-rw-r--r--drivers/staging/iio/imu/adis16400_core.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
index 0067bc70acba..fe89802e3fe7 100644
--- a/drivers/staging/iio/imu/adis16400_core.c
+++ b/drivers/staging/iio/imu/adis16400_core.c
@@ -770,7 +770,12 @@ static struct adis16400_chip_info adis16400_chips[] = {
}
};
-
+static const struct iio_info adis16400_info = {
+ .driver_module = THIS_MODULE,
+ .read_raw = &adis16400_read_raw,
+ .write_raw = &adis16400_write_raw,
+ .attrs = &adis16400_attribute_group,
+};
static int __devinit adis16400_probe(struct spi_device *spi)
{
@@ -792,12 +797,9 @@ static int __devinit adis16400_probe(struct spi_device *spi)
st->variant = &adis16400_chips[spi_get_device_id(spi)->driver_data];
indio_dev->dev.parent = &spi->dev;
indio_dev->name = spi_get_device_id(spi)->name;
- indio_dev->attrs = &adis16400_attribute_group;
indio_dev->channels = st->variant->channels;
indio_dev->num_channels = st->variant->num_channels;
- indio_dev->read_raw = &adis16400_read_raw;
- indio_dev->write_raw = &adis16400_write_raw;
- indio_dev->driver_module = THIS_MODULE;
+ indio_dev->info = &adis16400_info;
indio_dev->modes = INDIO_DIRECT_MODE;
ret = adis16400_configure_ring(indio_dev);