aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/gyro/adis16060_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/iio/gyro/adis16060_core.c')
-rw-r--r--drivers/staging/iio/gyro/adis16060_core.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging/iio/gyro/adis16060_core.c
index 700eb3980f9e..edf9e3bf3efd 100644
--- a/drivers/staging/iio/gyro/adis16060_core.c
+++ b/drivers/staging/iio/gyro/adis16060_core.c
@@ -30,7 +30,7 @@
* @us_w: actual spi_device to write config
* @us_r: actual spi_device to read back data
* @indio_dev: industrial I/O device structure
- * @buf: transmit or recieve buffer
+ * @buf: transmit or receive buffer
* @buf_lock: mutex to protect tx and rx
**/
struct adis16060_state {
@@ -133,6 +133,11 @@ static const struct attribute_group adis16060_attribute_group = {
.attrs = adis16060_attributes,
};
+static const struct iio_info adis16060_info = {
+ .attrs = &adis16060_attribute_group,
+ .driver_module = THIS_MODULE,
+};
+
static int __devinit adis16060_r_probe(struct spi_device *spi)
{
int ret, regdone = 0;
@@ -147,16 +152,15 @@ static int __devinit adis16060_r_probe(struct spi_device *spi)
st->us_r = spi;
mutex_init(&st->buf_lock);
/* setup the industrialio driver allocated elements */
- st->indio_dev = iio_allocate_device();
+ st->indio_dev = iio_allocate_device(0);
if (st->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_st;
}
st->indio_dev->dev.parent = &spi->dev;
- st->indio_dev->attrs = &adis16060_attribute_group;
+ st->indio_dev->info = &adis16060_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);