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). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAABAgAGBQJQBZktAAoJEFSFNJnE9BaIf54P/1N+xW/r9Oji2CnbMDibXiQ1 fG9ABsduqS+Q0wGb1AaXhLYP0C/Eg1rXEPfK1YRC9/TQDCfkLRe/7XPJE3Mup5dh 2fRWdbtQUoMBIUMMaKYmzg8lEq0t1vXbbsF/o6//sIN7V4oiLC/YWGlWoKRcINzE WgnzmRDXD7kui5/cln874ivaCRtbCcvlGcOA2A5mIh/pwd4hlD5aHFwP+vpYYp5g 8QT6yZ3bPOwYN/qxmqqtfcPTluivwvCSjH/PCtqYIFWTsSSkyGUrHWOIFoUKnkmg +NclwX1nznZMUUMVPQDwdp9GBrTmB4oFZpYfd4HMZ0c0wiqLAjjsdIX/49UhAwNP ByEmskizEtTN5tTwF5yIrUOTFMz9Jq/GXst1ak4qqEL+8ojL3aZa/dAeO7LwNZ/6 XZAzlxcFJFvOJI/k+agQHe/Tl2RFVNXCwnH6wEo9T8HDjZpcShcOeSbTScGGci4A X53NMEXAtCgVnrEbrjEuV+qgvw/HFoC1kNbs+rWptJWIpVSxOjjznpp+3aKxWxm8 5IfhnJUkDV1Wg3HRnIbS27i3LBTg/Sj3lTv3ayMtc6+jpNIs9UaIJCnfSpi5rpT2 hVwJt+UOZL0w833dSO+18NcLcbALnGmmIqPP/2fuZAlwLypTwIqKRIPDwkSkJ+Wh bY08Qup4zo3UPQFf+hRU =tiQg -----END PGP SIGNATURE----- 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).
This commit is contained in:
commit
8405f041ad
@ -185,7 +185,7 @@ static irqreturn_t adjd_s311_trigger_handler(int irq, void *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (indio_dev->scan_timestamp)
|
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;
|
= time_ns;
|
||||||
iio_push_to_buffer(buffer, (u8 *)data->buffer, 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 */
|
/* Guaranteed to be aligned with 8 byte boundary */
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*(s64 *)(((phys_addr_t)data + len
|
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
|
||||||
+ sizeof(s64) - 1) & ~(sizeof(s64) - 1))
|
|
||||||
= pf->timestamp;
|
= pf->timestamp;
|
||||||
buffer->access->store_to(buffer, (u8 *)data, 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;
|
return 0;
|
||||||
|
|
||||||
errout5:
|
errout5:
|
||||||
free_irq(irq, iodev);
|
free_irq(irq, info);
|
||||||
errout4:
|
errout4:
|
||||||
clk_put(info->clk);
|
clk_put(info->clk);
|
||||||
errout3:
|
errout3:
|
||||||
@ -214,7 +214,7 @@ static int __devexit lpc32xx_adc_remove(struct platform_device *pdev)
|
|||||||
int irq = platform_get_irq(pdev, 0);
|
int irq = platform_get_irq(pdev, 0);
|
||||||
|
|
||||||
iio_device_unregister(iodev);
|
iio_device_unregister(iodev);
|
||||||
free_irq(irq, iodev);
|
free_irq(irq, info);
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
clk_put(info->clk);
|
clk_put(info->clk);
|
||||||
iounmap(info->adc_base);
|
iounmap(info->adc_base);
|
||||||
|
@ -617,7 +617,7 @@ static int __devinit adis16260_probe(struct spi_device *spi)
|
|||||||
if (pd)
|
if (pd)
|
||||||
st->negate = pd->negate;
|
st->negate = pd->negate;
|
||||||
/* this is only used for removal purposes */
|
/* this is only used for removal purposes */
|
||||||
spi_set_drvdata(spi, st);
|
spi_set_drvdata(spi, indio_dev);
|
||||||
|
|
||||||
st->us = spi;
|
st->us = spi;
|
||||||
mutex_init(&st->buf_lock);
|
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 */
|
/* Store the timestamp at an 8 byte aligned offset */
|
||||||
if (indio_dev->scan_timestamp)
|
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();
|
= iio_get_time_ns();
|
||||||
buffer->access->store_to(buffer, (u8 *)data, pf->timestamp);
|
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)
|
static int __devexit tsl2x7x_remove(struct i2c_client *client)
|
||||||
{
|
{
|
||||||
struct tsl2X7X_chip *chip = i2c_get_clientdata(client);
|
struct iio_dev *indio_dev = i2c_get_clientdata(client);
|
||||||
struct iio_dev *indio_dev = iio_priv_to_dev(chip);
|
|
||||||
|
|
||||||
tsl2x7x_chip_off(indio_dev);
|
tsl2x7x_chip_off(indio_dev);
|
||||||
|
|
||||||
iio_device_unregister(indio_dev);
|
iio_device_unregister(indio_dev);
|
||||||
if (client->irq)
|
if (client->irq)
|
||||||
free_irq(client->irq, chip->client->name);
|
free_irq(client->irq, indio_dev);
|
||||||
|
|
||||||
iio_device_free(indio_dev);
|
iio_device_free(indio_dev);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user