aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-05-14Staging: wlags49_h2: potential NULL dereferenceDan Carpenter1-2/+1
wl_device_dealloc() dereferences the "dev" paramter, so let's move it under the check for NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: comedi: refactor ni_pcimio driver and use module_comedi_pci_driverH Hartley Sweeten1-108/+84
Move the module_init/module_exit routines and the associated struct comedi_drive and struct pci_driver to the end of the source. This is more typical of how other drivers are written and removes the need for the forward declarations. Convert the driver to use the module_comedi_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: comedi: Use module_comedi_pci_driver and standardize driversH Hartley Sweeten15-455/+174
Convert the refactored comedi pci drivers to use the module_comedi_pci_driver() macro which makes the code smaller and a bit simpler. In the process, rename some of the symbols in the driver to standardize the comedi pci drivers. Based on the driver {name}: 1) Rename the comedi_driver to {name}_driver. 2) Use a static string {name} for the comedi_driver.driver_name. 3) Rename the pci probe/remove functions to {name)_pci_probe/remove. 4) Rename the pci id_table to {name}_pci_table. 5) Add the static string {name} for the pci_driver.name. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: comedi: Add helper macro for comedi pci driver boilerplateH Hartley Sweeten2-0/+50
Introduce the module_comedi_pci_driver macro, and the associated register/unregister functions, which is a convenience macro for comedi pci driver modules similar to module_platform_driver. It is intended to be used by drivers where the init/exit section does nothing but register/unregister the comedi driver and associated pci driver. By using this macro it is possible to eliminate a few lines of boilerplate code per comedi pci driver. Add a check to make sure that the pci_driver->name is set. Once all the comedi pci drivers have been fixed this will be removed. Also, when registering the pci driver check for failure and unregister the comedi driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: ipack: fix a few sparse warningsSamuel Iglesias Gonsalvez4-28/+35
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: ipack: added more info in Kconfig's help about ipackSamuel Iglesias Gonsalvez1-1/+5
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: ipack/devices/ipoctal: change the licence to explicitly GPLv2Samuel Iglesias Gonsalvez3-6/+3
Change the licence to explicitly GPLv2 to avoid possible conflicts in the future. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: ipack/bridges/tpci200: change the licence to explicitly GPLv2Samuel Iglesias Gonsalvez2-4/+2
Change the licence to explicitly GPLv2 to avoid possible conflicts in the future. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: ipack: change the licence to explicitly GPLv2Samuel Iglesias Gonsalvez2-4/+2
Change the licence to explicitly GPLv2 to avoid possible conflicts in the future. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: ipack: add contact email in TODO fileSamuel Iglesias Gonsalvez1-0/+6
Added myself in the TODO file. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: ipack: move the devices source line in Kconfig fileSamuel Iglesias Gonsalvez1-2/+2
Maintain the proper order of definitions in Kconfig following the time order of the commits. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Staging: move the position of the ipack source line in KconfigSamuel Iglesias Gonsalvez1-2/+2
Moved the ipack source line to the proper place, at the end of the list in the staging's Kconfig file. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:meter: Use dev_to_iio_dev()Lars-Peter Clausen7-51/+51
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:resolver: Use dev_to_iio_dev()Lars-Peter Clausen1-13/+13
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:magnetometer: Use dev_to_iio_dev()Lars-Peter Clausen2-10/+10
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:light: Use dev_to_iio_dev()Lars-Peter Clausen3-39/+39
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:imu: Use dev_to_iio_dev()Lars-Peter Clausen1-3/+3
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:impedance-analyzer: Use dev_to_iio_dev()Lars-Peter Clausen1-4/+4
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:gyro: Use dev_to_iio_dev()Lars-Peter Clausen1-4/+4
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:frequency: Use dev_to_iio_dev()Lars-Peter Clausen7-10/+10
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:dac: Use dev_to_iio_dev()Lars-Peter Clausen7-24/+24
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:cdc: Use dev_to_iio_dev()Lars-Peter Clausen3-12/+12
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:addac: Use dev_to_iio_dev()Lars-Peter Clausen1-70/+70
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:accel: Use dev_to_iio_dev()Lars-Peter Clausen9-31/+31
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:adc: Use dev_to_iio_dev()Lars-Peter Clausen11-65/+65
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:adis16400_ring: Pass IIO device directlyLars-Peter Clausen1-7/+5
When calling adis16350_spi_read_all and adis16400_spi_read_burst we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:ade7758_spi_read_burst: Pass IIO device directlyLars-Peter Clausen1-4/+3
When calling ade7758_spi_read_burst we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:adis16260_read_ring_data: Pass IIO device directlyLars-Peter Clausen1-4/+3
When calling adis16260_read_ring_data we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:__lis3l02dq_write_data_ready_config: Pass IIO device directlyLars-Peter Clausen1-3/+2
When calling __lis3l02dq_write_data_ready_config we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:adis16240_read_ring_data: Pass IIO device directlyLars-Peter Clausen1-4/+3
When calling adis16240_read_ring_data we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:adis16209_read_ring_data: Pass IIO device directlyLars-Peter Clausen1-4/+3
When calling adis16209_read_ring_data we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:adis16204_read_ring_data: Pass IIO device directlyLars-Peter Clausen1-4/+3
When calling adis16204_read_ring_data we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:adis16203_read_ring_data: Pass IIO device directlyLars-Peter Clausen1-4/+3
When calling adis16203_read_ring_data we pass the device struct of embedded in the IIO device only to look up the IIO device from the device struct again right away. This patch changes the code to pass the IIO device directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14iio: Use dev_to_iio_dev()Lars-Peter Clausen4-20/+20
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: "rts5139" Fix typos.Justin P. Mattock6-8/+8
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: r8712u: Remove needless test for NULLLarry Finger1-18/+16
In commit ee6aeff, a swatch warning was fixed by moving some code inside an if block that is executed only when the pointer padapter is not NULL. In fact, padapter can never be NULL and the corect fix should have been the removal of the test of padapter. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging:iio:dummy: Remove outdated commentLars-Peter Clausen1-2/+0
iio_device_free has to be called regardless of whether the device has been registered or not when freeing it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14IIO: AT91: Add DT support to at91_adc driverMaxime Ripard1-1/+131
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14ARM: AT91: IIO: Add AT91 ADC driver.Maxime Ripard5-0/+695
Add the ADC driver for Atmel's AT91SAM9G20-EK, AT91SAM9M10G45-EK and AT91SAM9X5 family boards. It has support for both software and hardware triggers. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14iio: amplifiers: New driver for AD8366 Dual-Digital Variable Gain AmplifierMichael Hennerich5-0/+248
Changes since V1: Apply review feedback: Introduce and use IIO_CHAN_INFO_HARDWAREGAIN Introduce and use Use IIO_VAL_INT_PLUS_MICRO_DB Modify out of staging include paths. Convert to new iio core API naming. Changes since V2: more sanity checking in write_raw Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14iio: core: introduce IIO_CHAN_INFO_HARDWAREGAINMichael Hennerich1-0/+1
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14iio: core: introduce dB scle: IIO_VAL_INT_PLUS_MICRO_DBMichael Hennerich1-6/+13
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14ramster: switch over to zsmalloc and crypto interfaceDan Magenheimer7-735/+199
RAMster does many zcache-like things. In order to avoid major merge conflicts at 3.4, ramster used lzo1x directly for compression and retained a local copy of xvmalloc, while zcache moved to the new zsmalloc allocator and the crypto API. This patch moves ramster forward to use zsmalloc and crypto. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: line6/config.h: Remove CHECKPOINT macroJohannes Thumshirn1-5/+0
Kill unused debugging macro CHECKPOINT Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: comedi: register sysfs device attributes with driver coreH Hartley Sweeten1-40/+12
Currently the sysfs device attributes are created by the comedi core after each comedi device is created. This can lead to a race condition where userspace gets an add event before the files are created. Register the device attributes with the comedi class so that the driver core handles creating them and we avoid the race. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: android: persistent_ram: Introduce persistent_ram_free()Anton Vorontsov2-0/+18
A corresponding function to persistent_ram_new(). Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: android: persistent_ram: Make it possible to use memory outside of bootmemAnton Vorontsov1-1/+17
This includes devices' memory (e.g. framebuffers or memory mapped EEPROMs on a local bus), as well as the normal RAM that we don't use for the main memory. For the normal (but unused) ram we could use kmaps, but this assumes highmem support, so we don't bother and just use the memory via ioremap. As a side effect, the following hack is possible: when used together with pstore_ram (new ramoops) module, we can limit the normal RAM region with mem= and then point ramoops to use the rest of the memory, e.g. mem=128M ramoops.mem_address=0x8000000 Sure, we could just reserve the region with memblock_reserve() early in the arch/ code, and then register a pstore_ram platform device pointing to the reserved region. It's still a viable option if platform wants to do so. Also, we might want to use IO accessors in case of a real device, but for now we don't bother (the old ramoops wasn't using it either, so at least we don't make things worse). Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: android: persistent_ram: Introduce persistent_ram_vmap()Anton Vorontsov1-5/+14
Factor out vmap logic out of persistent_ram_buffer_map(), this will make the code a bit more understandable when we'll add support for non-bootmem memory. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: android: persistent_ram: Introduce persistent_ram_new()Anton Vorontsov2-0/+30
The routine just creates a persistent ram zone at a specified address. For persistent_ram_init_ringbuffer() we'd need to add a 'struct persistent_ram' to the global list, and associate it with a device. We don't need all this complexity in pstore_ram, so we introduce the simple function. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14staging: android: persistent_ram: Introduce persistent_ram_post_init()Anton Vorontsov1-17/+27
Factor post init logic out of __persistent_ram_init(), we'll need it for the new persistent_ram_new() routine. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>