- 28 Jan, 2015 40 commits
-
-
Heba Aamer authored
This patch fixes the following checkpatch.pl error: fix spaces required around that '=' Signed-off-by:
Heba Aamer <heba93aamer@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heba Aamer authored
This patch fixes the following checkpatch.pl error: fix space required after that ';' Signed-off-by:
Heba Aamer <heba93aamer@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Davidlohr Bueso authored
Call __set_current_state() instead of assigning the new state directly. These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping track of who changed the state. Signed-off-by:
Davidlohr Bueso <dbueso@suse.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mariam Mohamed Fawzy authored
This patch fixes the following checkpatch.pl error: fix that open brace { should be on the previous line Signed-off-by:
Mariam Mohamed Fawzy <maryammohamed61@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mauro Stettler authored
(the initial post had a typo in the short summary, reposting) This fixes some of the code style issues in the flexfb driver by removing unnecessary initializations of static variables to 0 or to NULL. Signed-off-by:
Mauro Stettler <mauro.stettler@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Noralf Tronnes <notro@tronnes.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
`comedi_compat_ioctl()` just calls static inline function `raw_ioctl()` with the same parameters (although the former returns a `long` and the latter returns an `int`). Since `raw_ioctl()` is not called from anywhere else, just absorb its body into `comedi_compat_ioctl()`. 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>
-
Ian Abbott authored
Align some comments attached to members of the 32-bit compatibility structure definitions. These comments describe the original pointer types that are being represented by a `compat_uptr_t`. 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>
-
Ian Abbott authored
Use the usual block comment style. Combine some consecutive comments into block comments. Also remove part of a comment referring to `ptr_to_compat()` not being implemented until kernel version 2.6.11 as it's irrelevant. 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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
`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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
H Hartley Sweeten authored
commit 92afc2b2 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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
Ian Abbott authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
H Hartley Sweeten authored
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>
-
Vaishali Thakkar authored
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>
-