diff options
Diffstat (limited to 'drivers/staging/iio/gyro')
-rw-r--r-- | drivers/staging/iio/gyro/adis16060_core.c | 4 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/adis16080_core.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/adis16130_core.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_core.c | 14 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_ring.c | 3 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/adxrs450_core.c | 2 |
6 files changed, 11 insertions, 16 deletions
diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging/iio/gyro/adis16060_core.c index 9931e2060e1f..87151a7cff04 100644 --- a/drivers/staging/iio/gyro/adis16060_core.c +++ b/drivers/staging/iio/gyro/adis16060_core.c @@ -184,7 +184,7 @@ error_ret: } /* fixme, confirm ordering in this function */ -static int adis16060_r_remove(struct spi_device *spi) +static int __devexit adis16060_r_remove(struct spi_device *spi) { iio_device_unregister(spi_get_drvdata(spi)); iio_device_free(spi_get_drvdata(spi)); @@ -210,7 +210,7 @@ error_ret: return ret; } -static int adis16060_w_remove(struct spi_device *spi) +static int __devexit adis16060_w_remove(struct spi_device *spi) { return 0; } diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/staging/iio/gyro/adis16080_core.c index 345e4fa778ba..a73902573f79 100644 --- a/drivers/staging/iio/gyro/adis16080_core.c +++ b/drivers/staging/iio/gyro/adis16080_core.c @@ -177,7 +177,7 @@ error_ret: } /* fixme, confirm ordering in this function */ -static int adis16080_remove(struct spi_device *spi) +static int __devexit adis16080_remove(struct spi_device *spi) { iio_device_unregister(spi_get_drvdata(spi)); iio_device_free(spi_get_drvdata(spi)); diff --git a/drivers/staging/iio/gyro/adis16130_core.c b/drivers/staging/iio/gyro/adis16130_core.c index bf61cd0b5bbc..fbf96b0b6ee8 100644 --- a/drivers/staging/iio/gyro/adis16130_core.c +++ b/drivers/staging/iio/gyro/adis16130_core.c @@ -154,7 +154,7 @@ error_ret: } /* fixme, confirm ordering in this function */ -static int adis16130_remove(struct spi_device *spi) +static int __devexit adis16130_remove(struct spi_device *spi) { iio_device_unregister(spi_get_drvdata(spi)); iio_device_free(spi_get_drvdata(spi)); diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index 93aa431287ac..9571c03aa4cc 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -195,6 +195,8 @@ static ssize_t adis16260_write_frequency(struct device *dev, ret = strict_strtol(buf, 10, &val); if (ret) return ret; + if (val == 0) + return -EINVAL; mutex_lock(&indio_dev->mlock); if (spi_get_device_id(st->us)) { @@ -698,24 +700,18 @@ error_ret: return ret; } -static int adis16260_remove(struct spi_device *spi) +static int __devexit adis16260_remove(struct spi_device *spi) { - int ret; struct iio_dev *indio_dev = spi_get_drvdata(spi); iio_device_unregister(indio_dev); - - ret = adis16260_stop_device(indio_dev); - if (ret) - goto err_ret; - + adis16260_stop_device(indio_dev); adis16260_remove_trigger(indio_dev); iio_buffer_unregister(indio_dev); adis16260_unconfigure_ring(indio_dev); iio_device_free(indio_dev); -err_ret: - return ret; + return 0; } /* diff --git a/drivers/staging/iio/gyro/adis16260_ring.c b/drivers/staging/iio/gyro/adis16260_ring.c index eeee8e760e6c..e294cb49736d 100644 --- a/drivers/staging/iio/gyro/adis16260_ring.c +++ b/drivers/staging/iio/gyro/adis16260_ring.c @@ -62,7 +62,6 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p) struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->indio_dev; struct adis16260_state *st = iio_priv(indio_dev); - struct iio_buffer *ring = indio_dev->buffer; int i = 0; s16 *data; @@ -82,7 +81,7 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p) if (indio_dev->scan_timestamp) *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; - ring->access->store_to(ring, (u8 *)data, pf->timestamp); + iio_push_to_buffer(indio_dev->buffer, (u8 *)data); kfree(data); done: diff --git a/drivers/staging/iio/gyro/adxrs450_core.c b/drivers/staging/iio/gyro/adxrs450_core.c index 6513119b1e90..d93527d15917 100644 --- a/drivers/staging/iio/gyro/adxrs450_core.c +++ b/drivers/staging/iio/gyro/adxrs450_core.c @@ -409,7 +409,7 @@ error_ret: return ret; } -static int adxrs450_remove(struct spi_device *spi) +static int __devexit adxrs450_remove(struct spi_device *spi) { iio_device_unregister(spi_get_drvdata(spi)); iio_device_free(spi_get_drvdata(spi)); |