summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-28staging: comedi: comedi_compat32.c: reformat copyright commentIan Abbott
Use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: comedi_compat32.h: reformat copyright commentIan Abbott
Use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy backIan Abbott
`do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl. This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd` back to user-space. (This occurs when the low-level Comedi driver's `do_cmdtest()` handler returns non-zero to indicate a problem with the contents of the `struct comedi_cmd`, or when the `struct comedi_cmd` has the `CMDF_BOGUS` flag set.) `compat_cmd()` in "comedi_compat32.c" handles the 32-bit compatible version of the `COMEDI_CMD` ioctl. Currently, it never copies a 32-bit compatible version of `struct comedi_cmd` back to user-space, which is at odds with the way the regular `COMEDI_CMD` ioctl is handled. To fix it, change `compat_cmd()` to copy a 32-bit compatible version of the `struct comedi_cmd` back to user-space when the main ioctl handler returns `-EAGAIN`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: comedi_usb.h: move USB stuff out of comedidev.hIan Abbott
Move the USB-specific stuff out of "comedidev.h" into "comedi_usb.h". Comedi USB drivers now include "comedi_usb.h" instead of "comedidev.h", which now gets pulled in indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: vmk80xx: include new "comedi_usb.h" headerIan Abbott
Include the new "../comedi_usb.h" header instead of <linux/usb.h> and "../comedidev.h", which will now get included indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: usbduxsigma: include new "comedi_usb.h" headerIan Abbott
Include the new "../comedi_usb.h" header instead of <linux/usb.h> and "../comedidev.h", which will now get included indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: usbduxfast: include new "comedi_usb.h" headerIan Abbott
Include the new "../comedi_usb.h" header instead of <linux/usb.h> and "../comedidev.h", which will now get included indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: usbdux: include new "comedi_usb.h" headerIan Abbott
Include the new "../comedi_usb.h" header instead of <linux/usb.h> and "../comedidev.h", which will now get included indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: ni_usb6501: include new "comedi_usb.h" headerIan Abbott
Include the new "../comedi_usb.h" header instead of <linux/usb.h> and "../comedidev.h", which will now get included indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: dt9812: include new "comedi_usb.h" headerIan Abbott
Include the new "../comedi_usb.h" header instead of <linux/usb.h> and "../comedidev.h", which will now get included indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: comedi_usb.c: include new "comedi_usb.h" headerIan Abbott
Include the new "comedi_usb.h" header instead of <linux/usb.h> and "comedidev.h", which will now get included indirectly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: add comedi_usb.hIan Abbott
Add a new header that Comedi USB drivers can include instead of "comedidev.h". Currently, it just pulls in <linux/usb.h> and "comedidev.h", but the plan is to migrate the USB-specific stuff from "comedidev.h" here. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: pcl812: fix logic error in pcl812_ai_setup_dma()H Hartley Sweeten
commit 92afc2b229038d7b962ae69de5b07bc6c1cf51bf inroduced a logic error in the DMA size calculation. If the 'nsamples' is greater than the 'unread_samples' then DMA needs to be restarted. The current code checks it agains the 'max_samples'. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: addi_apci_1032: add comedi driver commentIan Abbott
Add a comedi driver comment in a form suitable for importing into Comedilib documentation. The information about the change-of-state subdevice has been pulled from other comments in the driver. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8255.h: reformat copyright commentIan Abbott
Use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8255.c: reformat remaining block commentsIan Abbott
Use the usual block comment formatting style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8255.c: document subdev_8255_init() and _mm_init()Ian Abbott
Add kerneldoc comments for the subdev_8255_init() and subdev_8255_mm_init() functions and remove the other comment about how to use this module in a comedi driver. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8255.c: reformat comedi driver commentIan Abbott
Use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8255.c: reformat copyright commentIan Abbott
Use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8253.h: use usual style for single-line commentsIan Abbott
Use one space after the opening and one space before the closing of the comment. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8253.h: reformat other block commentsIan Abbott
Use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: 8253.h: reformat copyright commentIan Abbott
Use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: introduce das16_ai_set_mux_range()H Hartley Sweeten
Introduce a helper function to program the mux and gain for analog input single channel (*insn_read) and multi-channel (*do_cmd) operations. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: fix DMA size for short transfersH Hartley Sweeten
Currently this driver alwasy programs the DMA transfer to be the allocated size of the DMA buffer. When the async command 'stop_src' is TRIG_COUNT its possible (likely) for the last transfer to be less than the buffer size. Introduce a helper function, das16_ai_setup_dma(), to calculate the actual size of the DMA transfer based on the number of samples remaining and the number of unread samples. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: use comedi_async 'scans_done' to detect EOAH Hartley Sweeten
Refactor das16_interrupt() to use the comedi_async 'scans_done' member to detect the End-of-Acquisition for the async command. Use the helper function comedi_nsamples_left() to determine if DMA needs to be restarted. This allows the removal of the private data 'adc_byte_count' and fixes a possible integer overflow issue when that value is calculated. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: change type of private data 'timer_running'H Hartley Sweeten
This member of the private data is a true/false flag. For aesthetics, change the type to an unsigned int bit-field to save a bit of space. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: introduce das16_ao_range()H Hartley Sweeten
Clarify the (*attach) a bit by introducing a helper function to handle the setup of the analog output 'range_table'. Some of the boards supported by this driver do not have programmable ranges. The analog output subdevice can use optional range information provided by the user during the attach of the driver. Currently this range data is allocated and stored in the private data. Use the subdevice private data member instead and allocate the memory with comedi_alloc_spriv(). The comedi core will automatically free this memory when the driver is detached. If the allocation fails set the 'range_table' to 'range_unknown' instead of failing the driver attach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: introduce das16_ai_range()H Hartley Sweeten
Clarify the (*attach) a bit by introducing a helper function to handle the setup of the analog input 'range_table'. Some of the boards supported by this driver do not have programmable ranges. The analog input subdevice can use optional range information provided by the user during the attach of the driver. Currently this range data is allocated and stored in the private data. Use the subdevice private data member instead and allocate the memory with comedi_alloc_spriv(). The comedi core will automatically free this memory when the driver is detached. If the allocation fails set the 'range_table' to 'range_unknown' instead of failing the driver attach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: absorb das16_ai_disable()H Hartley Sweeten
This function is only called by das16_cancel(). Absorb it to clarify code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: remove unnecessary das16_ai_disable()H Hartley Sweeten
The das16_ai_disable() function disables interrupts and the pacer clock. This function is called by the subdevice (*cancel) operation. The comedi core will not call a subdevice (*insn_read) operation while an async command is running due to the s->busy check in parse_insn(). Since all async commands are terminated by a (*cancel), the das16_ai_disable() is not necessary in das16_ai_insn_read(). Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: das16: absorb das16_ai_enable()H Hartley Sweeten
This function is only called by das16_cmd_exec(). Absorb it to clarify code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28Staging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.cVaishali Thakkar
This patch introduces the use of function put_unaligned_le16. This is done using Coccinelle and semantic patch used is as follows: @a@ typedef u16, __le16, uint16_t; {u16,__le16,uint16_t} e16; identifier tmp; expression ptr; expression y,e; type T; type T; @@ - tmp = cpu_to_le16(y); <+... when != tmp ( - memcpy(ptr, (T)&tmp, \(2\|sizeof(u16)\|sizeof(__le16)\|sizeof(uint16_t)\|sizeof(e16)\)); + put_unaligned_le16(y,ptr); | - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le16(y,ptr); ) ...+> ? tmp = e @@ type T; identifier a.tmp; @@ - T tmp; ...when != tmp Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: rtl8192u: Refactor heavy nestingLorenzo Stoakes
This patch fixes warnings raised by checkpatch.pl relating to heavily indented lines in r8192U_dm.c by refactoring code to achieve the same outcome indented by one less tab. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: rtl8192u: remove redundant codeLorenzo Stoakes
This patch fixes warnings/errors raised by checkpatch.pl relating to redundant code in r8192U_dm.c. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: rtl8192u: fix whitespace and alignmentLorenzo Stoakes
This patch fixes warnings/errors raised by checkpatch.pl relating to whitespace in r8192U_dm.c, removes inconsistent whitespace, and additionally fixes some vertical alignment issues. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: rtl8192u: fix commentsLorenzo Stoakes
This patch fixes errors raised by checkpatch.pl relating to use of C99 comments in r8192U_dm.c, and cleans up existing ANSI C comments. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereferenceKumar Amit Mehta
In rtw_check_bcn_info(), check the return value of kzalloc() before dereferencing it, to avoid NULL pointer dereference. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: rtl8712: remove useless printing lineHeba Aamer
This patch removes an unneeded call to printk. Signed-off-by: Heba Aamer <heba93aamer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: unisys: rework signal remove/insert to avoid sparse lock warningsZachary Warren
Avoids the following warnings from sparse: visorchannel_funcs.c:457:9: warning: context imbalance in 'visorchannel_signalremove' - different lock contexts for basic block visorchannel_funcs.c:512:9: warning: context imbalance in 'visorchannel_signalinsert' - different lock contexts for basic These warnings are false positives. Sparse can't track conditional contexts. The change puts the lock/unlock into the same context by splitting the insert/remove functions each into a wrapper function that does locking if necessary and an inner function that does the insert/remove operation. Signed-off-by: Zachary Warren <conflatulence@gmail.com> Acked-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: lustre: lustre: mdc: lproc_mdc.c: Fix for potential NULL pointer ↵Kumar Amit Mehta
dereference In mdc_kuc_write(), OBD_ALLOC(lh, len) may leave 'lh' to NULL as kmalloc may fail to allocate memory. This fix adds a check to avoid, dereferencing a NULL pointer. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: lustre: lustre: obdclass: obd_mount.c: Fix NULL dereferenceKumar Amit Mehta
OBD_ALLOC_PTR(uuid) invokes kmalloc, which may return NULL. This fix adds a check before dereferencing such pointer. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: lustre: libcfs: nidstrings: Change type in printf format stringRickard Strandqvist
Wrong type in printf format string, requires 'unsigned int' but the argument type is 'int' This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: fix alignmentSudip Mukherjee
checkpatch cleanup: alignment should match open parenthesis Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: remove unnecessary blank linesSudip Mukherjee
checkpatch cleanup: blank lines are not necessary before closing brace and after opening brace. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: no space is necessary after a castSudip Mukherjee
checkpatch cleanup: space is not necessary after cast Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: add missing blank lineSudip Mukherjee
checkpatch cleanup to add missing blank line after declaration Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25MAINTAINERS: update for SM7XX driverSudip Mukherjee
add myself and Teddy Wang as the Maintainer of the SM7XX FRAME BUFFER DRIVER. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: update TODO fileSudip Mukherjee
update the email addresses in the TODO file, also update the final destination of this driver. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25Revert "staging: sm7xxfb: remove driver"Sudip Mukherjee
This reverts commit "dc93c85235efa5201e9a3c116bc3fbd1afc1a182" Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: Remove the Android alarm-dev driverJohn Stultz
The functionality provided by the Android alarm-dev driver should now be present in the timerfd interface (thanks to Greg Hackmann and Todd Poynor). As of Lollipop, AOSP can make use of the timerfd if alarm-dev is not present (though a fixup for setting the rtc time if rtc0 isn't the backing for _ALARM clockids has been applied post-Lollipop). Thus, we should be able to remove alarm-dev from staging. Cc: Greg Hackmann <ghackmann@google.com> Cc: Elliott Hughes <enh@google.com> Cc: Todd Poynor <toddpoynor@google.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Acked-by: Mark Salyzyn <salyzyn@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>