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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

+1 −2
Original line number Diff line number Diff line
@@ -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);

+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);

Loading