- 13 Sep, 2015 40 commits
-
-
Chaehyun Lim authored
This patch remove unnecessary parentheses found by checkpatch.pl CHECK: Unnecessary parentheses around pHandle->hSem Signed-off-by:
Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaehyun Lim authored
This patch removes blank line before a close brace "}" CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by:
Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaehyun Lim authored
This patch removes multiple blank lines. CHECK: Please don't use multiple blank lines Signed-off-by:
Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaehyun Lim authored
This patch removes a blank line for open brace "{" CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by:
Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaehyun Lim authored
This patch removes braces for single statement blocks. WARNING: braces {} are not necessary for single statement blocks Signed-off-by:
Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaehyun Lim authored
This patch adds a blank line after declaration found by checkpatch.pl WARNING: Missing a blank line after declarations. Signed-off-by:
Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Raphaël Beamonte authored
The MALLOC_WILC_BUFFER() macro was using a return statement, and didn't take care of possible memory leaks and subsequent bugs when it was failing after succeeding some allocations. This patch corrects this behavior. Signed-off-by:
Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Raphaël Beamonte authored
It was just a wrapper around kfree(), so call that instead. Signed-off-by:
Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Trung Thanh Le authored
replace comparison "obj" to NULL with "!obj" Signed-off-by:
Trung Thanh Le <trungthanh1608@yahoo.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peng Sun authored
fix two CHECK issues by checkpatch.pl with --strict: Alignment should match open parenthesis Signed-off-by:
Peng Sun <sironhide0null@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peng Sun authored
fix two CHECK issues by checkpatch.pl with --strict: No space is necessary after a cast Signed-off-by:
Peng Sun <sironhide0null@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peng Sun authored
fix a CHECK style issue by checkpatch.pl with --strict: spaces preferred around that '-' Signed-off-by:
Peng Sun <sironhide0null@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
with struct vnt_rx_desc and all members the same. volatile is removed from pointers as this generates warning message. Only the first four members of vnt_rx_desc need to be volatile. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
with struct vnt_rd_info volatile is removed because it will generate a warning (in any case this member is not) and renaming rd_info. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
with struct vnt_rdes1 and members wReqCount -> req_count wReserved -> reserved Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
with struct vnt_rdes0 replacing members as follows wResCount -> res_count f15Reserved -> f15_reserved f1Owner -> owner big endian f8Reserved1 -> f8_reserved1 f7Reserved -> f7_reserved Narrowing endian differences to inside structure. Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The clearing of the private data members in the (*detatch) is not necessary. The comedi core is going to kfree the private data as soon as the (*detach) finishes. 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 the (*auto_attach) to do the final setup of the analog input subdevice. For aesthetics absorb it into usbduxfast_auto_attach() and reorder the initialization of the subdevice to better follow the "norm" in comedi drivers. 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 semaphore down/up in usbduxfast_attach_common() is not necessary. This function is only called as part of the (*auto_attach) and does not talk to the USB device. 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 subdevice 'maxdata' is typically a mask of the valid bits that can be returned by a subdevice, (1 << bits) - 1. The analog inputs of this device have a resolution of 12-bits so the 'maxdata' should be 0x0fff. But, this hardware can produce a value of 0x1000 indicating an overflow from the ADC. The comedilib library's comedi_to_phys() function will then return NAN when this value is read from the hardware. Add a comment to clarify the strage 'maxdata' value. 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
For aesthetics, use 'goto' and a common exit point in this function so that the up of the semaphore is not overlooked. 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
Cleanup the validation of the cmd->convert_arg to use the same calculation in the (*do_cmdtest) and the (*do_cmd). Remove the, then unnecessary, redundant check in the (*do_cmd). 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
According to the code, and verified with the author Bernd Porr, the TRIG_EXT trigger is only valid for the cmd->start_src. Remove this trigger from the cmd->scan_begin_src and cmd->convert_src. The only valid scan_begin_src is then TRIG_FOLLOW and the convert_src is only TRIG_TIMER. Remove the redundant unique trigger checks in Step 2b of the (*do_cmdtest) as well as any other unnecessary checks of those trigger sources. Also remove the incorrect comment for a cmd->stop_src of TRIG_EXT. 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
Move this check from the (*do_cmd) to the (*do_cmdtest). 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 comment does not need to be multi-line. Fix it to remove the checkpatch warning. 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
As suggested by checkpatch.pl: CHECK: Prefer kernel type 'u8' over 'uint8_t' CHECK: Prefer kernel type 's8' over 'int8_t' For consistency, also change the uint16_t and int16_t types to u16 and s16. 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 private data 'devpriv' is allocated in the (*auto_attach) before the subdevices are initialized and the (*auto_attach) has to complete successfully before the core will call any of the subdevice operations. Because of this the (!devpriv) checks in the subdevice code can never fail. Remove them. 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 analog input (*do_cmd) only supports channel lists of 1, 2, 3, or 16 channels. Add a check for this to usbduxfast_ai_check_chanlist() and remove the check from usbduxfast_ai_cmd(). 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 channel list should be checked in Step 5 of the (*do_cmdtest) not as part of the (*do_cmd). Factor the check out of usbduxfast_ai_cmd(). Tidy up the factored out code. The channel number 'i' will never be greater than NUMCHANNELS due to the subdevice setup and the checks done in the code. The up/down of the semaphore is also not needed because the (*do_cmdtest) never actually tries to access the hardware. 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
Tidy up the block comments to fix the checkpatch.pl warnings. 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 #if 0'ed out code is not necessary. It's actually just a copy of the psuedo code in the S526 Hardware Manual that shows an example of a counter application. 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
Remove a couple unused defines, 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 (*insn_config) does not follow the comedi core API. It also would not work as expected. It appears to be trying to configure the analog input subdevice so that the (*insn_read) would read multiple channels (data[0]) and optionally enable the 15us delay (data[1]) needed for the multiplexor to change channels between samples. Unfortunately, the comedi core expects (*insn_read) operations to return 1 or more samples for a single channel, which is what the (*insn_read) in this driver does. The (*insn_config) is also enabling the analog input end-of-conversion interrupt. This isn't needed, and might be a problem since the driver does not currently request and interrupt. The enable bit does not need to be set for the end-of-conversion to occur in the interrupt status register. Remove the (*insn_config) and modify the (*insn_read) to automatically handle the 15us delay when needed. 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
Rename this function to follow the normal naming in comedi drivers. Use the comedi_offset_munge() helper to munge the hardware two's complement data to the comedi offset binary format. Change the final return to insn->n to clarify the return value without the need for the comment. 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
It's possible for the user to write more than one value to an analog output channel with the (*insn_write) operation. Use comedi_timeout() to check the interrupt status register to ensure that each data conversion is complete before writing the next value. 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
For aesthetics, add some whitespace to the subdevice initialization. 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
Define these registers and their bits. 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
Define this register and its bits. 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
Define this register and its bits and remove the magic numbers. 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
These registers use the same bit defines. Define both of them and the bits. 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>
-