Commit 8405f041 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'iio-fixes-3.6b' of...

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).
parents f555f123 dcbc3c41
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment