aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-09-26staging: comedi: s626: factor out the dma buffer allocationH Hartley Sweeten1-27/+30
To make the attach a bit cleaner, factor the dma buffer allocation out of attach_pci() into a new function. 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-09-26staging: comedi: s626: remove unnecessary checks of 'devpriv->base_addr'H Hartley Sweeten1-27/+24
'devpriv->base_addr' is valid from this point on in the attach_pci() function. Remove the unnecessary checks. 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-09-26staging: comedi: s626: cleanup ioremap()H Hartley Sweeten2-9/+4
The local variable 'resourceStart' is only used in the ioremap() to hold the PCI bar 0 base address. Just use the pci_resource_start() directly in the ioremap(). Also, instead of assuming the resource size for the ioremap, use pci_resource_len() to get the actual size. Remove the kernel noise when the ioremap fails and change the error code from -ENODEV to -ENOMEM. 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-09-26staging: comedi: s626: remove 'got_regions' from private dataH Hartley Sweeten1-4/+2
This variable is only used as a flag to indicate that the pci device has been enabled and needs to be disabled in the detach. Use the comedi_device 'iobase' for this and remove the private data variable. 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-09-26staging: comedi: s626: remove unneeded local variable in attach_pci()H Hartley Sweeten1-6/+3
The 'result' variable is only used to check the return from comedi_pci_enable(). Just reuse the 'ret' variable. Also, remove the kernel noise and use the error code from comedi_pci_enable() instead of returning -ENODEV. 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-09-26staging: comedi: s626: use dev->board_name for resource nameH Hartley Sweeten1-4/+3
Instead of the literal string "s626", use the dev->board_name for the resource name when enabling the PCI device and requesting the irq. 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-09-26staging: comedi: s626: store the pci_dev in the comedi_deviceH Hartley Sweeten1-13/+15
Use the hw_dev pointer in the comedi_device struct to hold the pci_dev instead of carrying it in the private data. 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-09-26staging: comedi: s626: use attach_pci callbackH Hartley Sweeten1-41/+4
Convert this PCI driver to use the comedi PCI auto config attach mechanism by adding an 'attach_pci' callback function. Since the driver does not require any external configuration options, and the legacy 'attach' callback is not optional, 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-09-26staging: comedi: s626: remove boardinfoH Hartley Sweeten1-59/+21
This driver only supports one board type. Move the used board info out of the boardinfo struct and 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-09-26staging: comedi: ni_daq_700: add AI subdeviceIan Abbott1-10/+126
Add subdevice 1 as an analog input (AI) subdevice. It currently only supports basic, software-triggered acquisitions. This is mostly the work of Fred Brooks (MODULE_AUTHOR), but he based his update on an older version of the driver. I applied the relevant changes with a few tweaks: adding an explicit `udelay(1)` in a timeout loop, replacing binary constants with hex, renaming functions, replacing `printk()` calls, removing exported symbols, removing (very) incomplete comedi "command" support, and making some coding-style changes. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: comedi: ni_daq_700: rename functions for DIO subdeviceIan Abbott1-6/+6
Rename `subdev_700_insn()` to `daq700_dio_insn_bits()` and `subdev_700_insn_config()` to `daq700_dio_insn_config()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: comedi: ni_daq_700: use prefix daq700Ian Abbott1-30/+30
Rename a few functions and variables to use the prefix `daq700` instead of the prefix or suffix `dio700`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for _stCPacketClassificationRuleSI and call directly.Kevin McKinney1-9/+3
This patch removes typedef for _stCPacketClassificationRuleSI, changes the name of the struct to bcm_packet_class_rules, and updates the comments appropriately . In addition, any calls to typedefs "CCPacketClassificationRuleSI, stCPacketClassificationRuleSI, or *pstCPacketClassificationRuleSI" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for _stPhsRuleSI and call directly.Kevin McKinney1-6/+4
This patch removes typedef for _stPhsRuleSI, changes the name of the struct to bcm_phs_rules, and updates the comments appropriately. In addition, any calls to typedefs "stPhsRuleSI, *pstPhsRuleSI, or CPhsRuleSI" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for _stConvergenceSLTypes and call directly.Kevin McKinney2-12/+10
This patch removes typedef for _stConvergenceSLTypes, changes the name of the struct to bcm_convergence_types, and updates the comments appropriately. In addition, any calls to typedefs "stConvergenceSLTypes, CConvergenceSLTypes, and *pstConvergenceSLTypes" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for _stServiceFlowParamSI and call directly.Kevin McKinney5-64/+40
This patch removes typedef for _stServiceFlowParamSI, changes the name of the struct to bcm_connect_mgr_params, and updates the comments appropriately. In addition, any calls to typedefs "stServiceFlowParamSI, *pstServiceFlowParamSI, and CServiceFlowParamSI" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for _stLocalSFAddRequest and call directly.Kevin McKinney2-9/+5
This patch removes typedef for _stLocalSFAddRequest, and changes the name of the struct to bcm_add_request. In addition, any calls to typedefs "stLocalSFAddRequest or *pstLocalSFAddRequest" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for _stLocalSFAddIndication and call directly.Kevin McKinney2-23/+9
This patch removes typedef for _stLocalSFAddIndication, and changes the name of the struct to bcm_add_indication. In addition, any calls to typedefs "stLocalSFAddIndication, *pstLocalSFAddIndication, stLocalSFChangeRequest, *pstLocalSFChangeRequest, stLocalSFChangeIndication, or *pstLocalSFChangeIndication " are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for _stLocalSFDeleteRequest and call directly.Kevin McKinney2-7/+4
This patch removes typedef for _stLocalSFDeleteRequest, and changes the name of the struct to bcm_del_request. In addition, any calls to typedefs "stLocalSFDeleteRequest or *pstLocalSFDeleteRequest" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: bcm: Remove typedef for stLocalSFDeleteIndication and call directly.Kevin McKinney2-9/+6
This patch removes typedef for stLocalSFDeleteIndication, and changes the name of the struct to bcm_del_indication. In addition, any calls to the following typedef "stLocalSFDeleteIndication" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rtl8712: fix foo* bar (foo*) errors reported by checkpatchDevendra Naga1-4/+4
fixes the following errors: drivers/staging/rtl8712/rtl871x_security.c:61: ERROR: "foo * bar" should be "foo *bar" drivers/staging/rtl8712/rtl871x_security.c:291: ERROR: "foo * bar" should be "foo *bar" drivers/staging/rtl8712/rtl871x_security.c:323: ERROR: "foo * bar" should be "foo *bar" drivers/staging/rtl8712/rtl871x_security.c:1371: ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rtl8712: fix a foo * bar errors reported by checkpatchDevendra Naga1-1/+1
fixes the following error: drivers/staging/rtl8712/rtl8712_xmit.c:379: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rtl8712: remove assignment of 0 to a static global variableDevendra Naga1-1/+1
fixes the following checkpatch warning: drivers/staging/rtl8712/os_intfs.c:99: ERROR: do not initialise statics to 0 or NULL as statics are always initialised to 0. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rts5139: use kzalloc() to close an info leakDan Carpenter1-1/+1
If we don't fill the whole buffer then there is information leaked to the user. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging "wlan-ng" Fix typos.Justin P. Mattock4-5/+5
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: winbond: Removed undesired spaces, lines and tabsHarsh Kumar1-14/+10
checkpatch cleanup: Removed some undesired spaces, lines and tabs to comply with coding style. Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26Staging: winbond: Changed c99 comments to c89 commentsHarsh Kumar1-20/+16
checkpatch cleanup: Changed c99 comments to c89 comments Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26[media] v4l2: make vidioc_s_crop constHans Verkuil1-1/+1
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_crop. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] v4l2: make vidioc_s_jpegcomp constHans Verkuil1-1/+1
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_jpegcomp. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26OMAPDRM: Remove manager->device referencesArchit Taneja1-2/+3
With the introduction of output entities, managers will now connect to outputs. Use the helper op for managers named get_device. This will abstract away the information on how to get the device from an overlay manager. Using the helper function will reduce the number of pointer dereferences a user of OMAPDSS needs to do and reduce risk of a NULL dereference. Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-25Merge tag 'iio-for-v3.7e' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman13-97/+88
Fifth round of new drivers and device support for the IIO subsystem in the 3.7 cycle. Here we have a mixed bag of new stuff, minor fixes and more major fixes for drivers added earlier in this cycle. 1) A number of fixes for the HID sensors code added in previous pull request. Typical stuff that has become apparent as more eyes have looked at the code post merging. Similar case for the ad5755 dac. 2) Cleanups of error handing in inkern.c - again typical stuff to see as code comes into heavier use and people notice the naughty short cuts that snuck in originally and kindly fix them. 3) A series from Lars that removes some incorrect error handling from the remove functions of a number of drivers. These have been there for a very long time hence I'm not pushing these out for the 3.6 cycle. 4) Support for more parts in the ad7780 driver. 5) A driver for the adcs on the lp8788 power management unit 6) A client driver for IIO to allow it's ADCs to be used for battery status measurement. Note this driver has some dependencies on some utility functions added to IIO in this series, hence it is coming via this tree rather than Anton's. 7) A null pointer dereference bug in the 'fake' driver. I'm not doing this as a fix for the 3.6 cycle because it only effects 'fake' hardware and that code is typically only used by people investigating how IIO works as part of writing new drivers. Hence it's hardly a critical fix.
2012-09-25staging: winbond: Coding Style correction and removal of unused macroHarsh Kumar1-5/+4
Removed an unused macro. Plus, couple of grammatical and coding style fixes. 1) The macro _INLINE is not used anywhere. Anyways __inline is not portable. 2) Changed comment from "Not use" to "Unused" make it grammatically correct and to fit in 80 word limit. 3.) Removed space after * Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-25staging: sbe-2t3e3: fix error handling in t3e3_init_channel()Alexey Khoroshilov1-4/+11
t3e3_init_channel() incorrectly handles errors in several places: it returns zero and does not deallocate all required resources. The patch fixes that places. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-25staging: dgrp: using vmalloc needs to include vmalloc.hStephen Rothwell1-0/+1
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-25staging: dgrp: fix potential call to strncpy with a negative numberBill Pemberton1-0/+6
In dgrp_receive() there is: desclen = ((plen - 12) > MAX_DESC_LEN) ? MAX_DESC_LEN : plen - 12; strncpy(nd->nd_ps_desc, b + 12, desclen); However, it's possible for plen to be <= 12 here so we'd be passing a negative number into the strncpy(). Fix this to not make the strncpy call and report an error if desclen is <= 0 Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-24Merge tag 'v3.6-rc7' into drm-intel-next-queuedDaniel Vetter22-47/+123
Manual backmerge of -rc7 to resolve a silent conflict leading to compile failure in drivers/gpu/drm/i915/intel_hdmi.c. This is due to the bugfix in -rc7: commit b98b60167279df3acac9422c3c9820d9ebbcf9fb Author: Wang Xingchao <xingchao.wang@intel.com> Date: Thu Sep 13 07:43:22 2012 +0800 drm/i915: HDMI - Clear Audio Enable bit for Hot Plug Since this code moved around a lot in -next git put that snippet at the wrong spot. I've tried to fix this by making the conflict explicit by merging a version for next with: commit 3cce574f0190dd149472059fb69267cf83d290f9 Author: Wang Xingchao <xingchao.wang@intel.com> Date: Thu Sep 13 11:19:00 2012 +0800 drm/i915: HDMI - Clear Audio Enable bit for Hot Plug unconditionally But that failed to solve the entire problem. To avoid pushing out further -nightly branch to our QA where this is broken, do the backmerge and manually add the stuff git adds to -next from the patch in -fixes. Note that this doesn't show up in git's merge diff (and hence is also not handled by git rerere), which adds to the reasons why I'd like to fix this with a verbose backmerge. The git merge diff only shows a bunch of trivial conflicts of the "code changed in lines next to each another" kind. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-24Fix a build error.Eduardo Valentin1-1/+3
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-09-24Thermal: Remove tc1/tc2 in generic thermal layer.Zhang Rui1-1/+1
Remove tc1/tc2 in generic thermal layer. .get_trend() callback starts to take effect from this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Valentin, Eduardo <eduardo.valentin@ti.com>
2012-09-22staging:iio:dummy: Fix potential NULL pointer dereferenceLars-Peter Clausen3-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>
2012-09-22staging:iio:ad7780: Add support for the ad7170/ad7171Lars-Peter Clausen2-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>
2012-09-22staging:iio:ad7780: Make powerdown GPIO optionalLars-Peter Clausen1-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>
2012-09-22staging:iio:sca3000: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-22staging:iio:lis3l02dq: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-22staging:iio:ade7759: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-22staging:iio:ade7758: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-22staging:iio:ade7754: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-22staging:iio:ade7753: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-22staging:iio:adis16400: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-22staging:iio:adis16200: Do not return a error in remove functionLars-Peter Clausen1-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>
2012-09-21staging: comedi: ni_labpc: don't pass struct comedi_cmd by valueIan Abbott1-5/+5
`labpc_suggest_transfer_size()` has a parameter of type `struct comedi_cmd` passed by value. Change it to pass by pointer reference. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>