summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
Commit message (Collapse)AuthorAgeFilesLines
* iio:adc:max1363 move from staging.Jonathan Cameron2012-11-103-1720/+0
| | | | | | Now this driver is using kfifo we can move it out of staging. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:max1363 cleanup regulator handling.Jonathan Cameron2012-11-101-22/+22
| | | | | | | | For historical reasons the regulator handling was a little clunky. This patch brings it inline with a more standard ordering wrt to allocation of the iio_device. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:max1363 white space cleanupJonathan Cameron2012-11-101-5/+1
| | | | Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:max1363 make docs match the contents of max1363_chip_infoJonathan Cameron2012-11-101-7/+6
| | | | Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:max1363 drop references to 'ring' given now using a fifoJonathan Cameron2012-11-101-14/+14
| | | | | | Seems worth clearing the old naming out to avoid any confusion in the future. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:max1363 consolidate files.Jonathan Cameron2012-11-105-333/+269
| | | | | | | | | | For a long while now the max1363 core has selected the buffer anyway. For a while I meant to make the separation work again, but given how long it has been it is probably time to conclude it will never happen and settle for tidying up what we have. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:max1363 ring_sw->kfifo conversionJonathan Cameron2012-11-102-5/+5
| | | | | | | We are moving towards scrapping ring_sw so this move is necessary. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Add support for multiple buffersJonathan Cameron2012-11-1016-23/+18
| | | | | | | | | Route all buffer writes through the demux. Addition or removal of a buffer results in tear down and setup of all the buffers for a given device. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Tested-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
* staging:iio: Move the ad7887 driver out of stagingLars-Peter Clausen2012-11-054-424/+0
| | | | | | | | The driver does not expose any custom API to userspace and none of the standard static code checker tools report any issues, 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:ad7887: Use passed in chan spec in ad7887_read_rawLars-Peter Clausen2012-11-051-3/+3
| | | | | | | | | | Use the passed in chan spec in ad7887_read_raw instead of alawys using the first chan spec entry from the chip info data. Since all channels have the same shift and realbits from a functional point of view it does not matter which chan spec is used, but the patch makes the a bit more clear. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad7887: Allow to use internal ref in two channel modeLars-Peter Clausen2012-11-051-15/+13
| | | | | | | | | | | While it is not recommended to use the internal reference in two channel mode in order to obtain optimal performance it is still possible to use it. While we are at it also get rid of the duplicate tx_cmd_buf entries. There are only two unique entries. One for channel 1 and one for channel 2. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad7887: Use proper kernel docLars-Peter Clausen2012-11-051-14/+13
| | | | | | | Use proper kernel doc to document the platform data struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad7887: Squash everything into one fileLars-Peter Clausen2012-11-054-182/+130
| | | | | | | | | | | The recent cleanups have decimated the drivers code size by quite a bit. It is only a few hundred lines in total now and we also always build buffer support, so there really is no need to spread the driver out over multiple files. Putting everything into one file also allows to reduce the code size a bit more by removing a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad7887: Rework regulator handlingLars-Peter Clausen2012-11-052-31/+24
| | | | | | | | | | | Rework the regulator handling of the ad7887 driver to match more closely what we do for other drivers. Only request the regulator if a external reference is used, but treat it as an error if requesting the regulator fails. Also remove the possibility to specify the reference voltage via platform data and always use the regulator for this. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad7887: Preallocate sample bufferLars-Peter Clausen2012-11-052-15/+6
| | | | | | | | | We know that the sample buffer will at most need to hold two 16 bit samples and the 64 bit aligned 64 bit timestamp. Preallocate a buffer large enough to hold this instead of allocating and freeing it each time a sample is read. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adis16400: Set the PROD_ID flag for the adis16334Lars-Peter Clausen2012-11-041-0/+1
| | | | | | | The adis16334 has the PROD_ID register so set the PROD_ID flag in its chip info. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adis16400: Remove now duplicated chip_table entryLars-Peter Clausen2012-11-041-14/+1
| | | | | | | | | | The ADIS1360 and ADIS13605 are very similar and do have the same software interface. The only difference is the contents of the PROD_ID register. Since we now read the product id from the device name instead of the chip_info struct we can use the same chip_table entry for both the ADIS1360 and ADIS13605. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adis16400: Fix product id checkLars-Peter Clausen2012-11-042-8/+6
| | | | | | | | | | | | | | | | | The product id check currently ANDs the read id with 0xF000 and compares the result to the product id from the chip info. Since none of the product ids in the chip info table end in 0x000 the check will always fail. Furthermore it is also wrong, the product id in the PROD_ID register will always match the part number of the device. Some of the ADIS16XXX devices are identical from a software point of view with the product id register having a different content. If we keep the current scheme of storing the product id in the chip info table this would require us to have multiple almost identical chip info table entries. So instead this patch changes the code to parse the product id from the device name. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adis16400: Fix adis16334 sampling frequency controlLars-Peter Clausen2012-11-042-32/+101
| | | | | | | | | | | | | | | Setting the sampling frequency for the adis16334 differs from the other devices. This patch introduces two new callback functions to the adis16400 chip_info struct which are used to specify how to read and write the current sample rate. The patch also introduces the proper implementations for these callbacks for the adis16334. Related to this is that the adis16334 has no slow mode and so we do not limit the SPI clock rate to 300kHz during initialization. The patch adds a new flag for devices which do have a slow mode. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: isl29018: Support suspend and resume.Bryan Freed2012-11-021-0/+45
| | | | | | | | | | | The driver leaves the device in power-down state anyway, so there is nothing to do on suspend. On resume, we just have to make sure the range and ADC values are updated in the device since it may have been powered down in suspend. Signed-off-by: Bryan Freed <bfreed@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adc: ad7280a.c: fixed macro coding styleKumar Amit Mehta2012-11-021-1/+1
| | | | | | | remove unnecessary semicolon from the macro definition Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Consolidate adt7310 and adt7410 driverLars-Peter Clausen2012-10-314-989/+364
| | | | | | | | | | | The adt7310 is the SPI version of the adt7410, so there is no need to have a separate driver for it. The register map layout is a bit different, i.e. the addresses of the register differ, but the individual register layouts are identical. We solve this by adding a small look-up table, which translates adt7410 register addresses to ad7310 register addresses. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge 3.7-rc3 into staging-nextGreg Kroah-Hartman2012-10-299-95/+132
|\ | | | | | | | | | | | | | | | | This resolves the conflict with: drivers/staging/comedi/drivers/amplc_dio200.c and syncs up the changes that happened in the staging directory for 3.7-rc3. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging:iio:adis16400: Fixup adis16336 temp channel attributesLars-Peter Clausen2012-10-191-1/+1
| | | | | | | | | | | | | | | | The temperature channel has a calibbias attribute which it should not have, but the offset attribute is missing. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:adis16400: Report correct temperature scale and offsetLars-Peter Clausen2012-10-192-3/+22
| | | | | | | | | | | | | | | | | | | | | | Temperature scale and offset differ between the different devices supported by this driver. Right now the driver always reports the temperature scale and offset of the adis16400 regardless of which chip variant is used. This patch adds two new attributes to the chip_info struct, one for the temperature scale and one for the temperature offset. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16400 channel offsets and scalesLars-Peter Clausen2012-10-191-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16400 are incorrect: * Voltage scale is off by a factor of 1000 * Temperature scale is off by a factor of 1000 * Temperature offset is completely wrong * Some of the acceleration scales are either completely wrong or have the wrong unit * Some of the angular velocity scale are either completely wrong or have the wrong unit This patch fixes these issues. For consistency it also converts scales which are correct to use the IIO_G_TO_M_S_2 and IIO_DEGREE_TO_RAD macro. This makes it much easier to compare it to the value given in the datasheet. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16260 channel offsets and scalesLars-Peter Clausen2012-10-191-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16260 are incorrect: * Temperature scale is off by a factor of 1000 * Voltage scale is off by a factor of 1000 * Temperature offset is completely wrong This patch fixes these issues. Also use the IIO_DEGREE_TO_RAD for the angle velocity since this makes it much easier to compare it to the value given in the datasheet. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16240 channel offsets and scalesLars-Peter Clausen2012-10-191-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16240 are incorrect: * Temperature scale is of by a factor of 1000 * Voltage scale is of by a factor of 1000 * Temperature offset is completely wrong * Peak scale is completely wrong This patch fixes these issues. Also use the IIO_G_TO_M_S_2 macro for the acceleration scale since this makes it much easier to compare it to the value given in the datasheet. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16220 channel offsets and scalesLars-Peter Clausen2012-10-191-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16220 are incorrect: * Temperature scale is off by a factor of 1000 * Voltage scale is off by a factor of 1000 * Acceleration seems to have a typo "187042" since it should be instead of "1887042" * Temperature offset is completely wrong This patch fixes these issues. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16209 channel offsets and scalesLars-Peter Clausen2012-10-191-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16209 are incorrect: * Temperature scale is of by a factor of 1000 * Voltage scale is of by a factor of 1000 * Temperature offset is completely wrong * Rotational position scale is missing This patch fixes these issues. Also use the IIO_G_TO_M_S_2 macro for the acceleration scale since this makes it much easier to compare it with the value given in the datasheet. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16204 channel offsets and scalesLars-Peter Clausen2012-10-191-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16204 are incorrect: * Temperature scale is off by a factor of 1000 * Voltage scale is off by a factor of 1000 * Acceleration is scale is in g instead of m/(s**2) * Temperature offset is completely wrong This patch fixes these issues. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16203 channel offsets and scalesLars-Peter Clausen2012-10-191-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16203 are incorrect: * Temperature scale is off by a factor of 1000 * Voltage scale is off by a factor of 1000 * Temperature offset is completely wrong This patch fixes these issues. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio: Fix adis16201 channel offsets and scalesLars-Peter Clausen2012-10-191-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Most of the channel offsets and scales in the adis16201 are incorrect: * Temperature scale is off by a factor of 1000 * Voltage scale is off by a factor of 1000 * Acceleration scale is in g instead of m/(s**2) * Temperature offset is completely wrong This patch fixes these issues. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging:iio:lpc32xx_adc: Use resource_size instead of opencoding itLars-Peter Clausen2012-10-191-1/+1
| | | | | | | | | | | | | | | | | | Fixes the following error from coccicheck: drivers/staging/iio/adc/lpc32xx_adc.c:153:43-46: ERROR: Missing resource_size with res Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging:iio: Don't compare boolean values with true/falseLars-Peter Clausen2012-10-192-2/+2
| | | | | | | | | | | | | | | | | | Fixes the following coccicheck warnings: drivers/staging/iio/accel/lis3l02dq_ring.c:240:5-10: WARNING: Comparison to bool drivers/staging/iio/iio_dummy_evgen.c:111:6-25: WARNING: Comparison to bool Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging iio: consistent commas in adis16400 channel specPeter Meerwald2012-10-191-5/+5
| | | | | | | | | | | | | | | | probably not the most important patch in the world Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: manuel.stahl@iis.fraunhofer.de Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging/iio/lis3l02dq: fix building without irq_to_gpioArnd Bergmann2012-10-193-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver has not been building for some time after the irq_to_gpio function has been removed from the kernel. The only board in the upstream kernel that provides this device is the "Stargate 2", which is also maintained by Jonathan Cameron. Rather than working around the problem by adding new platform data for this driver, this patch uses the of_gpio framework to get to the gpio number. However, the stargate2 code does not (yet) use DT based probing, so it is still broken, but at least building allyesconfig works again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging:iio: Remove unused DRIVER_NAME definesLars-Peter Clausen2012-10-1911-23/+0
| | | | | | | | | | | | | | | | Some drivers define a DRIVER_NAME, but never use the define. This patch removes defines. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging iio: use iio_trigger_generic_data_rdy_poll() in ↵Peter Meerwald2012-10-192-20/+2
| | | | | | | | | | | | | | | | accel/adis16209,adis16240 driver Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | drivers/staging/iio: Remove unnecessary semicolonPeter Senna Tschudin2012-10-1910-18/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:dummy: Fix potential NULL pointer dereferenceLars-Peter Clausen2012-09-223-16/+21
| | | | | | | | | | | | | If the config contains CONFIG_IIO_BUFFER=y and CONFIG_IIO_SIMPLE_DUMMY_BUFFER=n iio_simple_dummy_configure_buffer() is stubbed out and iio_buffer_register() is not. As a result we try to register a buffer which has not been configured. This will causes a NULL pointer deref in iio_buffer_register. To solve this issue move the iio_buffer_register() call to iio_simple_dummy_configure_buffer(), so it will only be called if iio_simple_dummy_configure_buffer() has been called. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad7780: Add support for the ad7170/ad7171Lars-Peter Clausen2012-09-222-8/+32
| | | | | | | | | The ad7170/ad7171 have a software interface similar to the ad7780. They do not have an external pin which allows to change the internal gain and the what is used for the gain bit in the ad7780/ad7781 becomes part of the check pattern. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad7780: Make powerdown GPIO optionalLars-Peter Clausen2012-09-221-14/+17
| | | | | | | | | | Some designs hardwire the PDRST pin to always on. In this case there is no GPIO to control the mode of the device, so make the GPIO optional. Since now all of the the platform data fields are optional now, make the platform data as a whole optional as well. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:sca3000: Do not return a error in remove functionLars-Peter Clausen2012-09-221-4/+2
| | | | | | | | | | | | | | | In the Linux device driver model the remove callback is not allowed to fail and the device will be removed regardless of the return value of the remove callback. So if we abort in the remove function and do not free all resources we will create a resource leak. Also all kinds of undefined behaviour are expected to happen since the IIO device is still there while its parent is already gone. The errors which the driver tries to handle in the remove function are non-critical, so we can just ignore them and continue to free all resources and remove the IIO device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:lis3l02dq: Do not return a error in remove functionLars-Peter Clausen2012-09-221-10/+4
| | | | | | | | | | | | | | | In the Linux device driver model the remove callback is not allowed to fail and the device will be removed regardless of the return value of the remove callback. So if we abort in the remove function and do not free all resources we will create a resource leak. Also all kinds of undefined behaviour are expected to happen since the IIO device is still there while its parent is already gone. The errors which the driver tries to handle in the remove function are non-critical, so we can just ignore them and continue to free all resources and remove the IIO device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ade7759: Do not return a error in remove functionLars-Peter Clausen2012-09-221-7/+2
| | | | | | | | | | | | | | | In the Linux device driver model the remove callback is not allowed to fail and the device will be removed regardless of the return value of the remove callback. So if we abort in the remove function and do not free all resources we will create a resource leak. Also all kinds of undefined behaviour are expected to happen since the IIO device is still there while its parent is already gone. The error which the driver tries to handle in the remove function is non-critical, so we can just ignore it and continue to free all resources and remove the IIO device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ade7758: Do not return a error in remove functionLars-Peter Clausen2012-09-221-7/+2
| | | | | | | | | | | | | | | In the Linux device driver model the remove callback is not allowed to fail and the device will be removed regardless of the return value of the remove callback. So if we abort in the remove function and do not free all resources we will create a resource leak. Also all kinds of undefined behaviour are expected to happen since the IIO device is still there while its parent is already gone. The error which the driver tries to handle in the remove function is non-critical, so we can just ignore it and continue to free all resources and remove the IIO device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ade7754: Do not return a error in remove functionLars-Peter Clausen2012-09-221-8/+2
| | | | | | | | | | | | | | | In the Linux device driver model the remove callback is not allowed to fail and the device will be removed regardless of the return value of the remove callback. So if we abort in the remove function and do not free all resources we will create a resource leak. Also all kinds of undefined behaviour are expected to happen since the IIO device is still there while its parent is already gone. The error which the driver tries to handle in the remove function is non-critical, so we can just ignore it and continue to free all resources and remove the IIO device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ade7753: Do not return a error in remove functionLars-Peter Clausen2012-09-221-8/+3
| | | | | | | | | | | | | | | In the Linux device driver model the remove callback is not allowed to fail and the device will be removed regardless of the return value of the remove callback. So if we abort in the remove function and do not free all resources we will create a resource leak. Also all kinds of undefined behaviour are expected to happen since the IIO device is still there while its parent is already gone. The error which the driver tries to handle in the remove function is non-critical, so we can just ignore it and continue to free all resources and remove the IIO device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adis16400: Do not return a error in remove functionLars-Peter Clausen2012-09-221-7/+1
| | | | | | | | | | | | | | | In the Linux device driver model the remove callback is not allowed to fail and the device will be removed regardless of the return value of the remove callback. So if we abort in the remove function and do not free all resources we will create a resource leak. Also all kinds of undefined behaviour are expected to happen since the IIO device is still there while its parent is already gone. The error which the driver tries to handle in the remove function is non-critical, so we can just ignore it and continue to free all resources and remove the IIO device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud