summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-07-15iio staging: fix cast warning and cleanup alignment codeiio-fixes-3.6bPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-15iio staging: fix cast warningPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-15iio: fix pointer cast warningPeter Meerwald
fix compile warning reported by Fengguang Wu: drivers/iio/light/adjd_s311.c: In function 'adjd_s311_trigger_handler': drivers/iio/light/adjd_s311.c:188:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/iio/light/adjd_s311.c:188:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 185 } 186 187 if (indio_dev->scan_timestamp) > 188 *(s64 *)((phys_addr_t)data->buffer + ALIGN(len, sizeof(s64))) 189 = time_ns; 190 iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns); 191 Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-14staging:iio:tsl2x7x: Ensure request_irq and free_irq dev_id parameter matchLars-Peter Clausen
The data parameters for request_irq and free_irq have to match, otherwise the IRQ wont be freed. The issue has been discovered using the following coccinelle patch: // <smpl> @r1@ type T; T data; @@ ( request_irq(..., (void *)data) | request_irq(..., data) | request_threaded_irq(..., (void *)data) | request_threaded_irq(..., data) ) @r2@ type r1.T; T data; position p; @@ ( free_irq@p(..., (void *)data) | free_irq@p(..., data) ) @depends on r1@ position p != r2.p; @@ *free_irq@p(...) // </smpl> Cc: Jon Brenner <jbrenner@taosinc.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-14staging:iio:lpc32xx_adc: Ensure request_irq and free_irq dev_id parameter matchLars-Peter Clausen
The data parameters for request_irq and free_irq have to match, otherwise the IRQ wont be freed. The issue has been discovered using the following coccinelle patch: // <smpl> @r1@ type T; T data; @@ ( request_irq(..., (void *)data) | request_irq(..., data) | request_threaded_irq(..., (void *)data) | request_threaded_irq(..., data) ) @r2@ type r1.T; T data; position p; @@ ( free_irq@p(..., (void *)data) | free_irq@p(..., data) ) @depends on r1@ position p != r2.p; @@ *free_irq@p(...) // </smpl> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-14staging:iio:tsl2x7x: Fix client data inconsistencyLars-Peter Clausen
In probe the I2C client data is set to the iio_dev struct in probe(), but assumed to be the tsl2X7X_chip struct in remove(). Fix this by reading the client data back as iio_dev as well. The issue has been discovered using the following coccinelle patch: // <smpl> @r1@ type T; T data; expression dev; @@ ( i2c_set_clientdata(dev, (void *)data) | i2c_set_clientdata(dev, data) ) @r2@ type r1.T; T data; position p; expression dev; @@ data = i2c_get_clientdata@p(dev) @depends on r1@ position p != r2.p; expression dev; identifier data; @@ *data = i2c_get_clientdata@p(dev) // </smpl> Cc: Jon Brenner <jbrenner@taosinc.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-14staging:iio:adis16260: Fix drvdata inconsistencyLars-Peter Clausen
The SPI drvdata is set to adis16260_state struct in probe(), but assumed to be the iio_dev struct in remove(). Fix this by setting it to the iio_dev in probe(). The issue has been discovered using the following coccinelle patch: // <smpl> @r1@ type T; T data; expression dev; @@ ( spi_set_drvdata(dev, (void *)data) | spi_set_drvdata(dev, data) ) @r2@ type r1.T; T data; position p; expression dev; @@ data = spi_get_drvdata@p(dev) @depends on r1@ position p != r2.p; expression dev; identifier data; @@ *data = spi_get_drvdata@p(dev) // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-07-13staging: comedi: rtd520: remove RtdDio0Read macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'readw'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdUsrOutSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdUtcGateSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdUtcClockSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdUtcCtrlPut macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writeb'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdUtcCounterPut macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdUtcCounterGet macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcSampleCounter macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcSampleCount macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAboutCounter macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAboutCount macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdDelayCounter macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdDelayCount macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdBurstCounter macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdBurstCount macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerCounter macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerCount macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdInterruptOverrunClear macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdInterruptOverrunStatus macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'readl'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdInterruptClearMask macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writew'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdInterruptClear macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'readw'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdInterruptMask macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writew'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdInterruptStatus macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'readw'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerStop macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerStart macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'readl'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdFifoStatus macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'readl'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcFifoGet2 macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used and the comment says it does not work. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcFifoGet macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'readw'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcStart macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdTriggerPolarity macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAboutStopEnable macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerTriggerMode macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcSampleCounterSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. It's also not used. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerClockSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerStopSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdPacerStartSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdBurstStartSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcConversionSource macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdAdcClearFifo macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdWriteCGLatch macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdWriteCGTable macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdEnableCGT macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-13staging: comedi: rtd520: remove RtdClearCGT macroH Hartley Sweeten
This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>