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>
This commit is contained in:
Jonathan Cameron
2011-04-15 18:55:56 +01:00
committed by Greg Kroah-Hartman
parent b428173316
commit 6f7c8ee585
62 changed files with 89 additions and 63 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ The crucial structure for device drivers in iio is iio_dev.
First allocate one using:
struct iio_dev *indio_dev = iio_allocate_device();
struct iio_dev *indio_dev = iio_allocate_device(0);
Then fill in the following:
+1 -1
View File
@@ -539,7 +539,7 @@ static int __devinit adis16201_probe(struct spi_device *spi)
st->us = 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_tx;
+1 -1
View File
@@ -448,7 +448,7 @@ static int __devinit adis16203_probe(struct spi_device *spi)
st->us = 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_tx;
+1 -1
View File
@@ -493,7 +493,7 @@ static int __devinit adis16204_probe(struct spi_device *spi)
st->us = 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_tx;
+1 -1
View File
@@ -488,7 +488,7 @@ static int __devinit adis16209_probe(struct spi_device *spi)
st->us = 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_tx;
+1 -1
View File
@@ -572,7 +572,7 @@ static int __devinit adis16220_probe(struct spi_device *spi)
st->us = 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_tx;
+1 -1
View File
@@ -485,7 +485,7 @@ static int __devinit adis16240_probe(struct spi_device *spi)
st->us = 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_tx;
+1 -1
View File
@@ -329,7 +329,7 @@ static int __devinit kxsd9_probe(struct spi_device *spi)
st->us = spi;
mutex_init(&st->buf_lock);
st->indio_dev = iio_allocate_device();
st->indio_dev = iio_allocate_device(0);
if (st->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_tx;
+1 -1
View File
@@ -805,7 +805,7 @@ static int __devinit lis3l02dq_probe(struct spi_device *spi)
st->us = spi;
mutex_init(&st->buf_lock);
/* setup the industrialio driver allocated elements */
st->help.indio_dev = iio_allocate_device();
st->help.indio_dev = iio_allocate_device(0);
if (st->help.indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_tx;
+1 -1
View File
@@ -1339,7 +1339,7 @@ static int __devinit __sca3000_probe(struct spi_device *spi,
mutex_init(&st->lock);
st->info = &sca3000_spi_chip_info_tbl[variant];
st->indio_dev = iio_allocate_device();
st->indio_dev = iio_allocate_device(0);
if (st->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_rx;
+1 -1
View File
@@ -778,7 +778,7 @@ static int __devinit ad7150_probe(struct i2c_client *client,
chip->client = client;
chip->name = id->name;
chip->indio_dev = iio_allocate_device();
chip->indio_dev = iio_allocate_device(0);
if (chip->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_chip;
+1 -1
View File
@@ -533,7 +533,7 @@ static int __devinit ad7152_probe(struct i2c_client *client,
chip->client = client;
chip->name = id->name;
chip->indio_dev = iio_allocate_device();
chip->indio_dev = iio_allocate_device(0);
if (chip->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_chip;
+1 -1
View File
@@ -926,7 +926,7 @@ static int __devinit ad7291_probe(struct i2c_client *client,
chip->name = id->name;
chip->command = AD7291_NOISE_DELAY | AD7291_T_SENSE_MASK;
chip->indio_dev = iio_allocate_device();
chip->indio_dev = iio_allocate_device(0);
if (chip->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_chip;
+1 -1
View File
@@ -173,7 +173,7 @@ static int __devinit ad7298_probe(struct spi_device *spi)
atomic_set(&st->protect_ring, 0);
st->spi = spi;
st->indio_dev = iio_allocate_device();
st->indio_dev = iio_allocate_device(0);
if (st->indio_dev == NULL) {
ret = -ENOMEM;
goto error_disable_reg;
+1 -1
View File
@@ -229,7 +229,7 @@ static int __devinit ad7314_probe(struct spi_device *spi_dev)
chip->spi_dev = spi_dev;
chip->name = spi_dev->modalias;
chip->indio_dev = iio_allocate_device();
chip->indio_dev = iio_allocate_device(0);
if (chip->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_chip;
+1 -1
View File
@@ -184,7 +184,7 @@ static int __devinit ad7476_probe(struct spi_device *spi)
atomic_set(&st->protect_ring, 0);
st->spi = spi;
st->indio_dev = iio_allocate_device();
st->indio_dev = iio_allocate_device(0);
if (st->indio_dev == NULL) {
ret = -ENOMEM;
goto error_disable_reg;
+1 -1
View File
@@ -447,7 +447,7 @@ struct ad7606_state *ad7606_probe(struct device *dev, int irq,
atomic_set(&st->protect_ring, 0);
st->indio_dev = iio_allocate_device();
st->indio_dev = iio_allocate_device(0);
if (st->indio_dev == NULL) {
ret = -ENOMEM;
goto error_disable_reg;
+1 -1
View File
@@ -635,7 +635,7 @@ static int __devinit ad774x_probe(struct i2c_client *client,
chip->client = client;
chip->name = id->name;
chip->indio_dev = iio_allocate_device();
chip->indio_dev = iio_allocate_device(0);
if (chip->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_chip;
+1 -1
View File
@@ -221,7 +221,7 @@ static int __devinit ad7780_probe(struct spi_device *spi)
spi_set_drvdata(spi, st);
st->spi = spi;
st->indio_dev = iio_allocate_device();
st->indio_dev = iio_allocate_device(0);
if (st->indio_dev == NULL) {
ret = -ENOMEM;
goto error_disable_reg;
+1 -1
View File
@@ -418,7 +418,7 @@ static int __devinit ad7816_probe(struct spi_device *spi_dev)
}
gpio_direction_input(chip->busy_pin);
chip->indio_dev = iio_allocate_device();
chip->indio_dev = iio_allocate_device(0);
if (chip->indio_dev == NULL) {
ret = -ENOMEM;
goto error_free_gpio;

Some files were not shown because too many files have changed in this diff Show More