diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-17 19:28:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-17 19:28:33 +0200 |
commit | 8405f041adfeabb137d81a624b70ff35a803c53c (patch) | |
tree | b6aefed9787eeab797c9c9b3db5e3f4a7a5baee9 /drivers | |
parent | tracing/function: Convert func_set_flag() to a switch statement (diff) | |
parent | iio staging: fix cast warning and cleanup alignment code (diff) | |
download | linux-8405f041adfeabb137d81a624b70ff35a803c53c.tar.xz linux-8405f041adfeabb137d81a624b70ff35a803c53c.zip |
Merge tag 'iio-fixes-3.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
IIO fixes for elements queued for 3.6 merge window.
3 types of fix here.
1) Incorrect pointer casting via phys_addr_t which causes
trouble on some architectures.
2) request_irq and free_irq dev_id parameters not matching.
3) Inconsistencies in client_data for some i2c devices
(writing one pointer and expecting another later).
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/light/adjd_s311.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_ring.c | 3 | ||||
-rw-r--r-- | drivers/staging/iio/adc/lpc32xx_adc.c | 4 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_core.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/iio_simple_dummy_buffer.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/light/tsl2x7x_core.c | 5 |
6 files changed, 8 insertions, 10 deletions
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c index e4851427d72f..1cbb449b319a 100644 --- a/drivers/iio/light/adjd_s311.c +++ b/drivers/iio/light/adjd_s311.c @@ -185,7 +185,7 @@ static irqreturn_t adjd_s311_trigger_handler(int irq, void *p) } if (indio_dev->scan_timestamp) - *(s64 *)((phys_addr_t)data->buffer + ALIGN(len, sizeof(s64))) + *(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64))) = time_ns; iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns); diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index d7f8af7678fd..18d108fd967a 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -151,8 +151,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p) /* Guaranteed to be aligned with 8 byte boundary */ if (indio_dev->scan_timestamp) - *(s64 *)(((phys_addr_t)data + len - + sizeof(s64) - 1) & ~(sizeof(s64) - 1)) + *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64))) = pf->timestamp; buffer->access->store_to(buffer, (u8 *)data, pf->timestamp); diff --git a/drivers/staging/iio/adc/lpc32xx_adc.c b/drivers/staging/iio/adc/lpc32xx_adc.c index 9690306d1f8f..348d051fc2f8 100644 --- a/drivers/staging/iio/adc/lpc32xx_adc.c +++ b/drivers/staging/iio/adc/lpc32xx_adc.c @@ -196,7 +196,7 @@ static int __devinit lpc32xx_adc_probe(struct platform_device *pdev) return 0; errout5: - free_irq(irq, iodev); + free_irq(irq, info); errout4: clk_put(info->clk); errout3: @@ -214,7 +214,7 @@ static int __devexit lpc32xx_adc_remove(struct platform_device *pdev) int irq = platform_get_irq(pdev, 0); iio_device_unregister(iodev); - free_irq(irq, iodev); + free_irq(irq, info); platform_set_drvdata(pdev, NULL); clk_put(info->clk); iounmap(info->adc_base); diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index f16b3938928f..93aa431287ac 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -617,7 +617,7 @@ static int __devinit adis16260_probe(struct spi_device *spi) if (pd) st->negate = pd->negate; /* this is only used for removal purposes */ - spi_set_drvdata(spi, st); + spi_set_drvdata(spi, indio_dev); st->us = spi; mutex_init(&st->buf_lock); diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c b/drivers/staging/iio/iio_simple_dummy_buffer.c index c0951f9f8a2f..bd628de472a9 100644 --- a/drivers/staging/iio/iio_simple_dummy_buffer.c +++ b/drivers/staging/iio/iio_simple_dummy_buffer.c @@ -85,7 +85,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) } /* Store the timestamp at an 8 byte aligned offset */ if (indio_dev->scan_timestamp) - *(s64 *)((phys_addr_t)data + ALIGN(len, sizeof(s64))) + *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64))) = iio_get_time_ns(); buffer->access->store_to(buffer, (u8 *)data, pf->timestamp); diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index fdf75e45428c..497a977ae411 100644 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c @@ -2028,14 +2028,13 @@ static int tsl2x7x_resume(struct device *dev) static int __devexit tsl2x7x_remove(struct i2c_client *client) { - struct tsl2X7X_chip *chip = i2c_get_clientdata(client); - struct iio_dev *indio_dev = iio_priv_to_dev(chip); + struct iio_dev *indio_dev = i2c_get_clientdata(client); tsl2x7x_chip_off(indio_dev); iio_device_unregister(indio_dev); if (client->irq) - free_irq(client->irq, chip->client->name); + free_irq(client->irq, indio_dev); iio_device_free(indio_dev); |