summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* iio/adc: (max1363) Fix data conversion problemsGuenter Roeck2013-02-021-2/+3
| | | | | | | | | | | | | | | For chips with more than 8 bit ADC resolution, received data was always masked against 0xfff, ie with a 12 bit mask. This can result in bad data for chips with 10 bit resolution if those chips have higher bits set (seen with MAX1139). The receive buffer was defined as char array. This could result in unintentional sign extensions if the upper bit in a received byte was set. Since the chip is configured for unipolar mode, we never have to handle negative values, and sign extensions are never needed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio/adc: (max1363) Remove duplicate codeGuenter Roeck2013-02-021-2/+0
| | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio/adc: (max1363) Provide OF node information to iio deviceGuenter Roeck2013-02-021-0/+1
| | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio/adc: (lp8788) Provide OF node information to iio deviceGuenter Roeck2013-02-021-0/+1
| | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging/iio: (iio_hwmon) Basic devicetree supportGuenter Roeck2013-02-021-0/+6
| | | | | | | Add 'iio-hwmon' OF compatibility table entry to enable OF matches. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging/iio: (iio_hwmon) Add support for sysfs name attributeGuenter Roeck2013-02-021-2/+10
| | | | | | | The 'name' attribute is mandatory for hwmon devices. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging/iio: (iio_hwmon) Use devm_kzallocGuenter Roeck2013-02-021-48/+22
| | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:common: removed unused functions outside st_sensors libraryDenis CIOCCA2013-02-022-46/+28
| | | | | | | | | | This patch remove st_sensors_get_sampling_frequency_avl and st_sensors_get_scale_avl functions used only in st_sensors_sysfs_sampling_frequency_avail and st_sensors_sysfs_scale_avail sysfs functions. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: Add itg3200Manuel Stahl2013-02-025-0/+723
| | | | | | | | | | This patch adds support for the InvenSense itg3200. The itg3200 is a three-axis gyro with 16-bit ADC and I2C interface. Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Move adxrs450 driver out of stagingLars-Peter Clausen2013-02-025-12/+12
| | | | | | | | The adxrs450 is in a reasonable shape now. It follows the IIO ABI and non of the standard code checker tools report any issue, so move it out of staging. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Move header file contents to main fileLars-Peter Clausen2013-02-023-64/+57
| | | | | | | | | The contents of the adxrs450 header file is not used outside the main drivers file, so just move the contents from the header file into the drivers main file. Also rename the adxrs450 driver file from adxrs450_core.c to adxrs450.c. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Fixup kernel doc commentsLars-Peter Clausen2013-02-021-3/+4
| | | | | | | | Fix the name of the iio_device parameter for a few functions and add documentation for one missing function parameter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Use usleep_range for the sequential transfer dealyLars-Peter Clausen2013-02-021-1/+1
| | | | | | | | | | | | The adxrs450 requires a delay of at least 0.1 ms between register writes. Using msleep() for such small delays is not recommended. So use usleep_range instead. Fixes the following checkpatch warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Don't split string across multiple linesLars-Peter Clausen2013-02-021-2/+1
| | | | | | | | | | | | | | This is one of the exceptions to the 80 chars per line rule since breaking the string in half it badly affects the grep-ability. Fixes the following checkpatch warning: WARNING: quoted string split across lines #203: FILE: staging/iio/gyro/adxrs450_core.c:203: + dev_warn(&st->us->dev, "The initial power on response " + "is not correct! Restart without reset?\n"); Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Reflow overlong linesLars-Peter Clausen2013-02-021-4/+4
| | | | | | | | | | | | | | | | Reflow two lines to meet the 80 characters per line limit. Fixes the following checkpatch warnings: WARNING: line over 80 characters #29: FILE: staging/iio/gyro/adxrs450_core.c:29: + * @reg_address: the address of the lower of the two registers,which should be an even address, WARNING: line over 80 characters #81: FILE: staging/iio/gyro/adxrs450_core.c:81: + * @reg_address: the address of the lower of the two registers,which should be an even address, Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Don't spam the bootlogLars-Peter Clausen2013-02-021-14/+0
| | | | | | | Don't spam the bootlog with the devices part id and serial number. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Reject out of range calibscale valuesLars-Peter Clausen2013-02-021-2/+3
| | | | | | | | Instead of silently discarding the upper bits reject out of range values for the calibscale property. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Perform sign extension for the calibbias registerLars-Peter Clausen2013-02-021-1/+1
| | | | | | | | | The calibbias (DNC) register contains a 10-bit twos complement value. Perform a proper sign extension when reading the register, otherwise negative will incorrectly be displayed as large positive values. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adxrs450: Make transfer buffers __be32Lars-Peter Clausen2013-02-022-41/+35
| | | | | | | | | | | | | Fixes the following sparse warnings: drivers/staging/iio/gyro/adxrs450_core.c:46:15: warning: cast to restricted __be32 drivers/staging/iio/gyro/adxrs450_core.c:62:17: warning: cast to restricted __be32 drivers/staging/iio/gyro/adxrs450_core.c:89:15: warning: cast to restricted __be32 drivers/staging/iio/gyro/adxrs450_core.c:129:17: warning: cast to restricted __be32 drivers/staging/iio/gyro/adxrs450_core.c:168:16: warning: cast to restricted __be32 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Partially revert "staging:iio:gyro:adxrs450 make more use of spi_read and ↵Lars-Peter Clausen2013-02-021-14/+34
| | | | | | | | | | | | | spi_write." This partially reverts commit cb4496876f03631eff913b3c608c964d48d61eb9. There is no apparent reason why we should split a transaction which consists out of multiple transfers into multiple transactions each having one transfer. While this works it introduces a bunch of unnecessary context switch and additional setup costs. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Remove noop call to __iio_update_bufferLars-Peter Clausen2013-01-312-14/+0
| | | | | | | | | | | | | | | __iio_update_buffer updates the buffer's bytes_per_datum and length fields. But the only user of this function just passes in these exact fields, so the call basically looks like this: buffer->bytes_per_datum = buffer->bytes_per_datum; buffer->length = buffer->length; Which means it is a noop and can be removed. Also remove the function itself, since it is now unused. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:magnetometer: Add STMicroelectronics magnetometers driverDenis Ciocca2013-01-317-0/+742
| | | | | | | | | This patch adds a generic magnetometer driver for STMicroelectronics magnetometers, currently it supports: LSM303DLHC, LSM303DLM, LIS3MDL. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:gyro: Add STMicroelectronics gyroscopes driverDenis Ciocca2013-01-317-0/+728
| | | | | | | | | | This patch adds a generic gyroscope driver for STMicroelectronics gyroscopes, currently it supports: L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:accel: Add STMicroelectronics accelerometers driverDenis Ciocca2013-01-317-0/+868
| | | | | | | | | | | This patch adds a generic accelerometer driver for STMicroelectronics accelerometers, currently it supports: LSM303DLH, LSM303DLHC, LIS3DH, LSM330D, LSM330DL, LSM330DLC, LIS331DLH, LSM303DL, LSM303DLM, LSM330. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:common: Add STMicroelectronics common libraryDenis Ciocca2013-01-3112-0/+1202
| | | | | | | | This patch add a generic library for STMicroelectronics 3-axis sensors. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: comedi: don't expose comedi_proc_{init,cleanup}H Hartley Sweeten2013-01-312-13/+15
| | | | | | | | | | These functions are only used by the comedi core. Move the prototypes to comedi_internal.h so they are not exposed to the comedi drivers. 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>
* staging: comedi: don't expose comedi_device_{attach,detach}H Hartley Sweeten2013-01-312-5/+9
| | | | | | | | | | | | | These functions are only used by the comedi core. Move the prototypes to comedi_internal.h so they are not exposed to the comedi drivers. Tidy up comedi_internal.h a bit so that all the internal stuff in drivers.c is grouped. 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>
* staging: comedi: tidy up the general purpose driver functionsH Hartley Sweeten2013-01-312-70/+73
| | | | | | | | | | | | Group all the general comedi driver register/config/attach prototypes into one place in comedidev.h. Reorder the functions in drivers.c a bit so they are in a more logical usage order (bottom to top). 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>
* staging: comedi: ni_daq_700: convert to auto attachH Hartley Sweeten2013-01-311-74/+33
| | | | | | | | | | | | | | Convert this pcmcia driver to the comedi auto attach mechanism. This allows getting rid of the "hack" needed to pass the pcmcia_device pointer from the pcmcia_driver to the comedi_driver. We can also get rid of the boardinfo since it was only used to provide the "name" that was used with the manual attach. 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>
* staging: comedi: das08_cs: convert to auto attachH Hartley Sweeten2013-01-311-82/+48
| | | | | | | | | | | | | | | Convert this pcmcia driver to the comedi auto attach mechanism. This allows getting rid of the "hack" needed to pass the pcmcia_device pointer from the pcmcia_driver to the comedi_driver. We still need the boardinfo because the das08 driver uses it. But we can get rid of the duplicate that allowed attaching with the driver name. 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>
* staging: comedi: cb_das16_cs: convert to auto attachH Hartley Sweeten2013-01-311-66/+49
| | | | | | | | | | | Convert this pcmcia driver to the comedi auto attach mechanism. This allows getting rid of the "hack" needed to pass the pcmcia_device pointer from the pcmcia_driver to the comedi_driver. 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>
* staging: comedi: allow pcmcia drivers to auto attachH Hartley Sweeten2013-01-312-0/+42
| | | | | | | | | Introduce some helper functions to allow converting the comedi pcmcia drivers to the comedi auto_attach mechanism. 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>
* staging: comedi: conditionally build in PCMCIA driver supportH Hartley Sweeten2013-01-315-58/+102
| | | | | | | | | | | | | | | | | | | | | Separate the comedi_pcmcia_* functions out of drivers.c into a new source file, comedi_pcmcia.c. This allows conditionally building support for comedi pcmcia drivers into the comedi core without the need for the #if'defery. Fix the Kconfig and Makefile appropriately. Group all the comedi_pcmcia_* prototypes into one place in comedidev.h. Protect these prototypes with an #ifdef so that building a comedi pcmcia driver without PCMCIA support will cause a build error. This will normally not happen as long as the comedi pcmcia driver is placed in the proper group in the Kconfig. Remove the #include <pcmcia/*.h> from drivers.c. These includes are only needed by the comedi pcmcia driver support code and the pcmcia drivers. The include should occur in those files. 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>
* staging: comedi: conditionally build in PCI driver supportH Hartley Sweeten2013-01-3164-161/+340
| | | | | | | | | | | | | | | | | | | | | | | Separate the comedi_pci_* functions out of drivers.c into a new source file, comedi_pci.c. This allows conditionally building support for comedi PCI drivers into the comedi core. Fix the Kconfig and Makefile appropriately. Group all the comedi_pci_* prototypes and related defines into one place in comedidev.h. Protect these prototypes with an #ifdef and provide some dummy functions so that the mixed ISA/PCI comedi drivers will still build correctly. Remove the #include <linux/pci.h> from comedidev.h and drivers.c. This include is only needed by the comedi PCI driver support code and the PCI drivers. The include should occur in those files. Also, remove the #include <linux/pci.h> from a couple non-PCI drivers since it's not needed. 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>
* staging: comedi: conditionally build in USB driver supportH Hartley Sweeten2013-01-318-79/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | Separate the comedi_usb_* functions out of drivers.c into a new source file, comedi_usb.c. This allows conditionally building support for comedi USB drivers into the comedi core without the need for the #if'defery. Fix the Kconfig and Makefile appropriately. For aesthetic reasons, add some whitespace to the Makefile to keep everything lined up. Group all the comedi_usb_* prototypes into one place in comedidev.h. Protect these prototypes with an #ifdef so that building a comedi usb driver without USB support will cause a build error. This will normally not happen as long as the comedi USB driver is placed in the proper group in the Kconfig. Remove the #include<linux/usb.h> from comedidev.h and drivers.c. This include is only needed by the comedi USB driver support code and the USB drivers. The include should occur in those files. Removing the include of usb.h exposed a couple drivers that need <linux/interrupt.h> and <linux/sched.h>. Add the missing includes. 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>
* staging: vt6656: Fix URB submitted while active warning.Malcolm Priestley2013-01-311-8/+20
| | | | | | | | | | | | | | | This error happens because PIPEnsControlOut and PIPEnsControlIn unlock the spin lock for delay, letting in another thread. The patch moves the current MP_SET_FLAG to before filling of sUsbCtlRequest for pControlURB and clears it in event of failing. Any thread calling either function while fMP_CONTROL_READS or fMP_CONTROL_WRITES flags set will return STATUS_FAILURE. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: stable@vger.kernel.org # 3.8 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Fix compiler warningPeter Hurley2013-01-311-1/+1
| | | | | | | | | Fix: drivers/staging/fwserial/fwserial.c:581:3: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Annotate rcu pointers with __rcuPeter Hurley2013-01-311-1/+1
| | | | | | | | | | | | | Fixes these sparse warnings: drivers/staging/fwserial/fwserial.c:430:16: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:699:30: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:802:16: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:898:16: sparse: incompatible types in comparison expression (different address spaces) drivers/staging/fwserial/fwserial.c:1842:14: sparse: incompatible types in comparison expression (different address spaces) Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zsmalloc: remove unused pool nameSeth Jennings2013-01-303-10/+4
| | | | | | | | | | | | zs_create_pool() currently takes a name argument which is never used in any useful way. This patch removes it. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Acked-by: Nitin Gupta <ngupta@vflare.org> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: ISA DMA drivers should depend on ISA_DMA_APIGeert Uytterhoeven2013-01-301-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m68k allmodconfig: CC [M] drivers/staging/comedi/drivers/pcl812.o drivers/staging/comedi/drivers/pcl812.c: In function ‘pcl812_ai_cmd’: drivers/staging/comedi/drivers/pcl812.c:736: error: implicit declaration of function ‘set_dma_mode’ drivers/staging/comedi/drivers/pcl812.c:736: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/pcl812.c:736: error: (Each undeclared identifier is reported only once drivers/staging/comedi/drivers/pcl812.c:736: error: for each function it appears in.) drivers/staging/comedi/drivers/pcl812.c:737: error: implicit declaration of function ‘claim_dma_lock’ drivers/staging/comedi/drivers/pcl812.c:738: error: implicit declaration of function ‘clear_dma_ff’ drivers/staging/comedi/drivers/pcl812.c:739: error: implicit declaration of function ‘set_dma_addr’ drivers/staging/comedi/drivers/pcl812.c:740: error: implicit declaration of function ‘set_dma_count’ drivers/staging/comedi/drivers/pcl812.c:741: error: implicit declaration of function ‘release_dma_lock’ drivers/staging/comedi/drivers/pcl812.c:742: error: implicit declaration of function ‘enable_dma’ drivers/staging/comedi/drivers/pcl812.c: In function ‘interrupt_pcl812_ai_dma’: drivers/staging/comedi/drivers/pcl812.c:883: error: implicit declaration of function ‘disable_dma’ drivers/staging/comedi/drivers/pcl812.c:884: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/pcl812.c: In function ‘pcl812_ai_poll’: drivers/staging/comedi/drivers/pcl812.c:947: error: implicit declaration of function ‘get_dma_residue’ make[2]: *** [drivers/staging/comedi/drivers/pcl812.o] Error 1 CC [M] drivers/staging/comedi/drivers/pcl816.o drivers/staging/comedi/drivers/pcl816.c: In function ‘interrupt_pcl816_ai_mode13_dma’: drivers/staging/comedi/drivers/pcl816.c:359: error: implicit declaration of function ‘disable_dma’ drivers/staging/comedi/drivers/pcl816.c:366: error: implicit declaration of function ‘set_dma_mode’ drivers/staging/comedi/drivers/pcl816.c:366: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/pcl816.c:366: error: (Each undeclared identifier is reported only once drivers/staging/comedi/drivers/pcl816.c:366: error: for each function it appears in.) drivers/staging/comedi/drivers/pcl816.c:367: error: implicit declaration of function ‘claim_dma_lock’ drivers/staging/comedi/drivers/pcl816.c:369: error: implicit declaration of function ‘set_dma_addr’ drivers/staging/comedi/drivers/pcl816.c:372: error: implicit declaration of function ‘set_dma_count’ drivers/staging/comedi/drivers/pcl816.c:378: error: implicit declaration of function ‘release_dma_lock’ drivers/staging/comedi/drivers/pcl816.c:379: error: implicit declaration of function ‘enable_dma’ drivers/staging/comedi/drivers/pcl816.c: In function ‘pcl816_ai_cmd’: drivers/staging/comedi/drivers/pcl816.c:629: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/pcl816.c:631: error: implicit declaration of function ‘clear_dma_ff’ drivers/staging/comedi/drivers/pcl816.c: In function ‘pcl816_ai_poll’: drivers/staging/comedi/drivers/pcl816.c:679: error: implicit declaration of function ‘get_dma_residue’ make[2]: *** [drivers/staging/comedi/drivers/pcl816.o] Error 1 CC [M] drivers/staging/comedi/drivers/pcl818.o drivers/staging/comedi/drivers/pcl818.c: In function ‘interrupt_pcl818_ai_mode13_dma’: drivers/staging/comedi/drivers/pcl818.c:547: error: implicit declaration of function ‘disable_dma’ drivers/staging/comedi/drivers/pcl818.c:550: error: implicit declaration of function ‘set_dma_mode’ drivers/staging/comedi/drivers/pcl818.c:550: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/pcl818.c:550: error: (Each undeclared identifier is reported only once drivers/staging/comedi/drivers/pcl818.c:550: error: for each function it appears in.) drivers/staging/comedi/drivers/pcl818.c:551: error: implicit declaration of function ‘claim_dma_lock’ drivers/staging/comedi/drivers/pcl818.c:552: error: implicit declaration of function ‘set_dma_addr’ drivers/staging/comedi/drivers/pcl818.c:555: error: implicit declaration of function ‘set_dma_count’ drivers/staging/comedi/drivers/pcl818.c:561: error: implicit declaration of function ‘release_dma_lock’ drivers/staging/comedi/drivers/pcl818.c:562: error: implicit declaration of function ‘enable_dma’ drivers/staging/comedi/drivers/pcl818.c: In function ‘pcl818_ai_mode13dma_int’: drivers/staging/comedi/drivers/pcl818.c:886: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/pcl818.c:888: error: implicit declaration of function ‘clear_dma_ff’ make[2]: *** [drivers/staging/comedi/drivers/pcl818.o] Error 1 CC [M] drivers/staging/comedi/drivers/das16.o drivers/staging/comedi/drivers/das16.c: In function ‘das16_cmd_exec’: drivers/staging/comedi/drivers/das16.c:644: error: implicit declaration of function ‘claim_dma_lock’ drivers/staging/comedi/drivers/das16.c:645: error: implicit declaration of function ‘disable_dma’ drivers/staging/comedi/drivers/das16.c:648: error: implicit declaration of function ‘clear_dma_ff’ drivers/staging/comedi/drivers/das16.c:650: error: implicit declaration of function ‘set_dma_addr’ drivers/staging/comedi/drivers/das16.c:654: error: implicit declaration of function ‘set_dma_count’ drivers/staging/comedi/drivers/das16.c:655: error: implicit declaration of function ‘enable_dma’ drivers/staging/comedi/drivers/das16.c:656: error: implicit declaration of function ‘release_dma_lock’ drivers/staging/comedi/drivers/das16.c: In function ‘disable_dma_on_even’: drivers/staging/comedi/drivers/das16.c:845: error: implicit declaration of function ‘get_dma_residue’ drivers/staging/comedi/drivers/das16.c: In function ‘das16_attach’: drivers/staging/comedi/drivers/das16.c:1197: error: implicit declaration of function ‘set_dma_mode’ drivers/staging/comedi/drivers/das16.c:1197: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/das16.c:1197: error: (Each undeclared identifier is reported only once drivers/staging/comedi/drivers/das16.c:1197: error: for each function it appears in.) make[2]: *** [drivers/staging/comedi/drivers/das16.o] Error 1 CC [M] drivers/staging/comedi/drivers/das1800.o drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_flush_dma_channel’: drivers/staging/comedi/drivers/das1800.c:555: error: implicit declaration of function ‘disable_dma’ drivers/staging/comedi/drivers/das1800.c:559: error: implicit declaration of function ‘clear_dma_ff’ drivers/staging/comedi/drivers/das1800.c:562: error: implicit declaration of function ‘get_dma_residue’ drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_flush_dma’: drivers/staging/comedi/drivers/das1800.c:586: error: implicit declaration of function ‘claim_dma_lock’ drivers/staging/comedi/drivers/das1800.c:603: error: implicit declaration of function ‘release_dma_lock’ drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_handle_dma’: drivers/staging/comedi/drivers/das1800.c:622: error: implicit declaration of function ‘set_dma_addr’ drivers/staging/comedi/drivers/das1800.c:624: error: implicit declaration of function ‘set_dma_count’ drivers/staging/comedi/drivers/das1800.c:625: error: implicit declaration of function ‘enable_dma’ drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_init_dma’: drivers/staging/comedi/drivers/das1800.c:1424: error: implicit declaration of function ‘set_dma_mode’ drivers/staging/comedi/drivers/das1800.c:1424: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/das1800.c:1424: error: (Each undeclared identifier is reported only once drivers/staging/comedi/drivers/das1800.c:1424: error: for each function it appears in.) make[2]: *** [drivers/staging/comedi/drivers/das1800.o] Error 1 CC [M] drivers/staging/comedi/drivers/dt282x.o drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_ao_dma_interrupt’: drivers/staging/comedi/drivers/dt282x.c:328: error: implicit declaration of function ‘disable_dma’ drivers/staging/comedi/drivers/dt282x.c: In function ‘prep_ai_dma’: drivers/staging/comedi/drivers/dt282x.c:416: error: implicit declaration of function ‘set_dma_mode’ drivers/staging/comedi/drivers/dt282x.c:416: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/dt282x.c:416: error: (Each undeclared identifier is reported only once drivers/staging/comedi/drivers/dt282x.c:416: error: for each function it appears in.) drivers/staging/comedi/drivers/dt282x.c:417: error: implicit declaration of function ‘claim_dma_lock’ drivers/staging/comedi/drivers/dt282x.c:418: error: implicit declaration of function ‘clear_dma_ff’ drivers/staging/comedi/drivers/dt282x.c:419: error: implicit declaration of function ‘set_dma_addr’ drivers/staging/comedi/drivers/dt282x.c:420: error: implicit declaration of function ‘set_dma_count’ drivers/staging/comedi/drivers/dt282x.c:421: error: implicit declaration of function ‘release_dma_lock’ drivers/staging/comedi/drivers/dt282x.c:423: error: implicit declaration of function ‘enable_dma’ drivers/staging/comedi/drivers/dt282x.c: In function ‘prep_ao_dma’: drivers/staging/comedi/drivers/dt282x.c:439: error: ‘DMA_MODE_WRITE’ undeclared (first use in this function) drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_interrupt’: drivers/staging/comedi/drivers/dt282x.c:471: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_ai_cmd’: drivers/staging/comedi/drivers/dt282x.c:690: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_ao_cmd’: drivers/staging/comedi/drivers/dt282x.c:938: error: ‘DMA_MODE_WRITE’ undeclared (first use in this function) make[2]: *** [drivers/staging/comedi/drivers/dt282x.o] Error 1 CC [M] drivers/staging/comedi/drivers/ni_at_a2150.o drivers/staging/comedi/drivers/ni_at_a2150.c: In function ‘a2150_interrupt’: drivers/staging/comedi/drivers/ni_at_a2150.c:237: error: implicit declaration of function ‘claim_dma_lock’ drivers/staging/comedi/drivers/ni_at_a2150.c:238: error: implicit declaration of function ‘disable_dma’ drivers/staging/comedi/drivers/ni_at_a2150.c:241: error: implicit declaration of function ‘clear_dma_ff’ drivers/staging/comedi/drivers/ni_at_a2150.c:249: error: implicit declaration of function ‘get_dma_residue’ drivers/staging/comedi/drivers/ni_at_a2150.c:286: error: implicit declaration of function ‘set_dma_addr’ drivers/staging/comedi/drivers/ni_at_a2150.c:287: error: implicit declaration of function ‘set_dma_count’ drivers/staging/comedi/drivers/ni_at_a2150.c:288: error: implicit declaration of function ‘enable_dma’ drivers/staging/comedi/drivers/ni_at_a2150.c:290: error: implicit declaration of function ‘release_dma_lock’ drivers/staging/comedi/drivers/ni_at_a2150.c: In function ‘a2150_attach’: drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: implicit declaration of function ‘set_dma_mode’ drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: ‘DMA_MODE_READ’ undeclared (first use in this function) drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: (Each undeclared identifier is reported only once drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: for each function it appears in.) make[2]: *** [drivers/staging/comedi/drivers/ni_at_a2150.o] Error 1 Make PCL816, PCL818, DAS16, DAS1800, DT282X, and NI_AT_A2150 depend on ISA_DMA_API to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: cleanup all board minors on module exitIan Abbott2013-01-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The comedi core module optionally allocates some legacy board minor devices on module load and cleans these up on module exit. These are used for manual configuration of comedi boards (for those low-level comedi drivers that support manual configuration - mainly for ISA boards). Other board minor devices are created and destroyed dynamically in response to bus device probe and remove requests. The ioctl used for manual configuration (attachment) and removal (detachment) of devices is COMEDI_DEVCONFIG, but that works for any board minor device, including those that were originally created dynamically. If the COMEDI_DEVCONFIG ioctl is used to manually detach an automatically created and attached device, commit 7d3135af399e92cf4c9bbc5f86b6c140aab3b88c ("staging: comedi: prevent auto-unconfig of manually configured devices") ensures that the board minor will no longer be automatically detached and destroyed by a bus device remove request. From that point on the board minor behaves more like one of the comedi "legacy" board minors. (There would be some justification for destroying the board minor instead, but I'd rather leave that decision until removal of board minors has been made safer than it currently is.) Although the board minor behaves more like a legacy board minor, it is not currently cleaned up on module exit. In fact, the module exit code will bug out because this board minor has not been cleaned up. Change comedi_cleanup_legacy_minors() (called from the module exit code, and from the module init code on error) to clean up all board minors. Rename the function to comedi_cleanup_board_minors() to reflect the change in functionality. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: disallow COMEDI_DEVCONFIG on non-board minorsIan Abbott2013-01-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Comedi has two sorts of minor devices: (a) normal board minor devices in the range 0 to COMEDI_NUM_BOARD_MINORS-1 inclusive; and (b) special subdevice minor devices in the range COMEDI_NUM_BOARD_MINORS upwards that are used to open the same underlying comedi device as the normal board minor devices, but with non-default read and write subdevices for asynchronous commands. The special subdevice minor devices get created when a board supporting asynchronous commands is attached to a normal board minor device, and destroyed when the board is detached from the normal board minor device. One way to attach or detach a board is by using the COMEDI_DEVCONFIG ioctl. This should only be used on normal board minors as the special subdevice minors are too ephemeral. In particular, the change introduced in commit 7d3135af399e92cf4c9bbc5f86b6c140aab3b88c ("staging: comedi: prevent auto-unconfig of manually configured devices") breaks horribly for special subdevice minor devices. Since there's no legitimate use for the COMEDI_DEVCONFIG ioctl on a special subdevice minor device node, disallow it and return -ENOTTY. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Fix endian issue in unit directoryPeter Hurley2013-01-291-6/+5
| | | | | | | | Reported-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: add diagnostic for buffer overflowPeter Hurley2013-01-291-1/+4
| | | | | Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Remove reference to removed constantPeter Hurley2013-01-291-1/+1
| | | | | | | | FWSERIAL_TTY_START_MINOR was removed. The minor_start is allocated by tty_alloc_driver(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Don't use deprecated alloc_tty_driver()Peter Hurley2013-01-291-12/+9
| | | | | | | Use tty_alloc_driver() instead. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Factor unstable stats/debug/status info to debugfsPeter Hurley2013-01-292-0/+84
| | | | | | | | | | | | | | | | | | | | Add the following file hierarchy to debugfs: <debugfs>-+ +- firewire_serial -+- <unit> -+- peers | +- stats | +- <unit> -+- peers +- stats The 'peers' file (read-only) contains status and configuration info for attached peers for the given fwserial unit. The 'stats' file (read-only) contains statistics and data profiling information for each tty port for the given fwserial unit. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Cleanup /proc/tty/driver/ filePeter Hurley2013-01-291-24/+15
| | | | | | | | Factor out extra stats, data profiles, debugging info and peer info from procfs file in preparation for using debugfs instead. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Create loop device the 'tty' wayPeter Hurley2013-01-292-96/+93
| | | | | | | | | | | | Register a second tty driver to create loopback devices for each firewire node. Note that the loopback devices are numbered from 0; the tty->index is transformed when used to index the port table. Remove the hack that previously enabled this. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fwserial: Fix sparse build warningsPeter Hurley2013-01-292-2/+4
| | | | | | Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>