summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/magnetometer
diff options
context:
space:
mode:
authorJonathan Cameron2011-04-15 19:55:56 +0200
committerGreg Kroah-Hartman2011-04-26 02:23:09 +0200
commit6f7c8ee585e9db54cb29af1bdb93f29837824933 (patch)
tree2eaf2ef782137ed1b9996c0fd511c40f1efb6625 /drivers/staging/iio/magnetometer
parentstaging:iio: replace rip_lots naming with read_first_n (diff)
downloadkernel-qcow2-linux-6f7c8ee585e9db54cb29af1bdb93f29837824933.tar.gz
kernel-qcow2-linux-6f7c8ee585e9db54cb29af1bdb93f29837824933.tar.xz
kernel-qcow2-linux-6f7c8ee585e9db54cb29af1bdb93f29837824933.zip
staging:iio: Add ability to allocate private data space to iio_allocate_device
Suggested by Arnd Bergmann. Note this will break ALL drivers that are out of mainline. The fix is trivial change of iio_allocate_device() -> iio_allocate_device(0) Sorry if this causes issues for any one! V2: Include new drivers in the update Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/magnetometer')
-rw-r--r--drivers/staging/iio/magnetometer/ak8975.c2
-rw-r--r--drivers/staging/iio/magnetometer/hmc5843.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/magnetometer/ak8975.c b/drivers/staging/iio/magnetometer/ak8975.c
index d71904a83706..2226b88882d8 100644
--- a/drivers/staging/iio/magnetometer/ak8975.c
+++ b/drivers/staging/iio/magnetometer/ak8975.c
@@ -526,7 +526,7 @@ static int ak8975_probe(struct i2c_client *client,
}
/* Register with IIO */
- data->indio_dev = iio_allocate_device();
+ data->indio_dev = iio_allocate_device(0);
if (data->indio_dev == NULL) {
err = -ENOMEM;
goto exit_gpio;
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 51689177e00e..d0676e99f157 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -552,7 +552,7 @@ static int hmc5843_probe(struct i2c_client *client,
/* Initialize the HMC5843 chip */
hmc5843_init_client(client);
- data->indio_dev = iio_allocate_device();
+ data->indio_dev = iio_allocate_device(0);
if (!data->indio_dev) {
err = -ENOMEM;
goto exit_free1;