summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
Commit message (Collapse)AuthorAgeFilesLines
* Staging: comedi: Align the * in block commentsRamiro Oliveira2016-10-021-1/+1
| | | | | | | Align the * on each line of block comments as reported by checkpatch Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: Use vma_pages function on vma object instead of explicit ↵sayli karnik2016-09-201-1/+1
| | | | | | | | | | | computation This patch uses vma_pages function on vma object instead of explicit computation. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: Use the BIT() macro instead of left shifting 1sayli karnik2016-09-161-38/+38
| | | | | | | | This patch replaces left shifts on 1 with the BIT(x) macro, as suggested by checkpatch.pl. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: s626: Remove all unused functionsBhumika Goyal2016-09-161-284/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all #ifdef'ed static functions as they are not used anywhere in the kernel. Some functions were detected using Coccinelle but removed by hand and some were removed as the functions in which they were getting used were also unused functions. Script: @initialize:python@ @@ def display(name,p): print(name,p[0].file) @r1@ identifier func; type T; position p; @@ static T func@p(...) { ... } @r@ identifier r1.func; @@ func @script:python depends on !r@ func << r1.func; p << r1.p; @@ display(func,p) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: drivers: Delete NULL check before pci_dev_putBhumika Goyal2016-09-131-2/+1
| | | | | | | | | | | | | | | | | The function pci_dev_put checks whether its argument is NULL and returns immediately. Therefore, NULL test before the call if not needed. Found using coccinelle: @@ expression x; @@ - if(x) - pci_dev_put(x); + pci_dev_put(x); Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: comedi_fops: coding style fixesMatias Mucciolo2016-09-131-3/+3
| | | | | | | | - Fixed coding style in comedi_fops.c Symbolic to octal permission. Signed-off-by: Matias Mucciolo <mmucciolo@suteba.org.ar> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.8-rc5 into staging-nextGreg Kroah-Hartman2016-09-055-39/+26
|\ | | | | | | | | | | We want the staging fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: ni_mio_common: fix AO inttrig backwards compatibilityIan Abbott2016-08-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ebb657babfa9 ("staging: comedi: ni_mio_common: clarify the cmd->start_arg validation and use") introduced a backwards compatibility issue in the use of asynchronous commands on the AO subdevice when `start_src` is `TRIG_EXT`. Valid values for `start_src` are `TRIG_INT` (for internal, software trigger), and `TRIG_EXT` (for external trigger). When set to `TRIG_EXT`. In both cases, the driver relies on an internal, software trigger to set things up (allowing the user application to write sufficient samples to the data buffer before the trigger), so it acts as a software "pre-trigger" in the `TRIG_EXT` case. The software trigger is handled by `ni_ao_inttrig()`. Prior to the above change, when `start_src` was `TRIG_INT`, `start_arg` was required to be 0, and `ni_ao_inttrig()` checked that the software trigger number was also 0. After the above change, when `start_src` was `TRIG_INT`, any value was allowed for `start_arg`, and `ni_ao_inttrig()` checked that the software trigger number matched this `start_arg` value. The backwards compatibility issue is that the internal trigger number now has to match `start_arg` when `start_src` is `TRIG_EXT` when it previously had to be 0. Fix the backwards compatibility issue in `ni_ao_inttrig()` by always allowing software trigger number 0 when `start_src` is something other than `TRIG_INT`. Thanks to Spencer Olson for reporting the issue. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reported-by: Spencer Olson <olsonse@umich.edu> Fixes: ebb657babfa9 ("staging: comedi: ni_mio_common: clarify the cmd->start_arg validation and use") Cc: stable <stable@vger.kernel.org> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: dt2811: fix a precedence bugDan Carpenter2016-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | Bitwise | has higher precedence than ?: so we need to add some parenthesis for this to work as intended. Fixes: 7c9574090d30 ('staging: comedi: dt2811: simplify A/D reference configuration') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: adv_pci1760: Do not return EINVAL for CMDF_ROUND_DOWN.Phil Turnbull2016-08-211-0/+1
| | | | | | | | | | | | | | | | | | The CMDF_ROUND_DOWN case falls through and so always returns -EINVAL. Fixes: 14b93bb6bbf0 ("staging: comedi: adv_pci_dio: separate out PCI-1760 support") Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: ni_mio_common: fix wrong insn_write handlerIan Abbott2016-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For counter subdevices, the `s->insn_write` handler is being set to the wrong function, `ni_tio_insn_read()`. It should be `ni_tio_insn_write()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reported-by: Éric Piel <piel@delmic.com> Fixes: 10f74377eec3 ("staging: comedi: ni_tio: make ni_tio_winsn() a proper comedi (*insn_write)" Cc: <stable@vger.kernel.org> # 3.17+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: comedi_test: fix timer race conditionsIan Abbott2016-08-211-34/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 73e0e4dfed4c ("staging: comedi: comedi_test: fix timer lock-up") fixed a lock-up in the timer routine `waveform_ai_timer()` (which was called `waveform_ai_interrupt()` at the time) caused by commit 240512474424 ("staging: comedi: comedi_test: use comedi_handle_events()"). However, it introduced a race condition that can result in the timer routine misbehaving, such as accessing freed memory or dereferencing a NULL pointer. 73e0... changed the timer routine to do nothing unless a `WAVEFORM_AI_RUNNING` flag was set, and changed `waveform_ai_cancel()` to clear the flag and replace a call to `del_timer_sync()` with a call to `del_timer()`. `waveform_ai_cancel()` may be called from the timer routine itself (via `comedi_handle_events()`), or from `do_cancel()`. (`do_cancel()` is called as a result of a file operation (usually a `COMEDI_CANCEL` ioctl command, or a release), or during device removal.) When called from `do_cancel()`, the call to `waveform_ai_cancel()` is followed by a call to `do_become_nonbusy()`, which frees up stuff for the current asynchronous command under the assumption that it is now safe to do so. The race condition occurs when the timer routine `waveform_ai_timer()` checks the `WAVEFORM_AI_RUNNING` flag just before it is cleared by `waveform_ai_cancel()`, and is still running during the call to `do_become_nonbusy()`. In particular, it can lead to a NULL pointer dereference: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffffc0c63add>] waveform_ai_timer+0x17d/0x290 [comedi_test] That corresponds to this line in `waveform_ai_timer()`: unsigned int chanspec = cmd->chanlist[async->cur_chan]; but `do_become_nonbusy()` frees `cmd->chanlist` and sets it to `NULL`. Fix the race by calling `del_timer_sync()` instead of `del_timer()` in `waveform_ai_cancel()` when not in an interrupt context. The only time `waveform_ai_cancel()` is called in an interrupt context is when it is called from the timer routine itself, via `comedi_handle_events()`. There is no longer any need for the `WAVEFORM_AI_RUNNING` flag, so get rid of it. The bug was copied from the AI subdevice to the AO when support for commands on the AO subdevice was added by commit 0cf55bbef2f9 ("staging: comedi: comedi_test: implement commands on AO subdevice"). That involves the timer routine `waveform_ao_timer()`, the comedi "cancel" routine `waveform_ao_cancel()`, and the flag `WAVEFORM_AO_RUNNING`. Fix it in the same way as for the AI subdevice. Fixes: 73e0e4dfed4c ("staging: comedi: comedi_test: fix timer lock-up") Fixes: 0cf55bbef2f9 ("staging: comedi: comedi_test: implement commands on AO subdevice") Reported-by: Éric Piel <piel@delmic.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: <stable@vger.kernel.org> # 4.4+ Cc: Éric Piel <piel@delmic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: comedi: daqboard2000: bug fix board type matching codeIan Abbott2016-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `daqboard2000_find_boardinfo()` is supposed to check if the DaqBoard/2000 series model is supported, based on the PCI subvendor and subdevice ID. The current code is wrong as it is comparing the PCI device's subdevice ID to an expected, fixed value for the subvendor ID. It should be comparing the PCI device's subvendor ID to this fixed value. Correct it. Fixes: 7e8401b23e7f ("staging: comedi: daqboard2000: add back subsystem_device check") Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: <stable@vger.kernel.org> # 3.7+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: cb_pcidas64: Fix checkpath warningAnson Jacob2016-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fix checkpatch.pl warning: Please use a blank line after function/struct/union/enum declarations Move macro definition to the top of the file Aligne macro definitions Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: ni_at_a2150: Fix checkpatch warningAnson Jacob2016-09-021-81/+89
| | | | | | | | | | | | | | | | Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: jr3_pci.c: Fix checkpatch warningAnson Jacob2016-09-021-6/+7
| | | | | | | | | | | | | | | | Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: s626.h: Fix checkpatch warningAnson Jacob2016-09-021-2/+2
| | | | | | | | | | | | | | | | | | Fix checkpatch.pl warning for Comparisons should place the constant on the right side of the test Remove extra space after /* Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: ni_atmio.c: Fix checkpatch warningAnson Jacob2016-09-021-7/+4
| | | | | | | | | | | | | | | | | | Fix checkpatch.pl warning for 'Statements should start on a tabstop' Convert single line block comment to single line comment Align single line comment Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: jr3_pci.h: Fix checkpatch warningAnson Jacob2016-09-021-118/+172
| | | | | | | | | | | | | | | | | | | | | | Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Block comments starts with /* followed by comments on the next line Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: cb_pcidas64: Fix commenting styleAnson Jacob2016-09-021-217/+214
| | | | | | | | | | | | | | | | Remove additional space after /* Convert single line block comment into single line comment Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: cb_pcidas64.c: Fix checkpatch warningAnson Jacob2016-09-021-71/+77
| | | | | | | | | | | | | | | | | | Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: fix spelling mistake "Firmare" -> "Firmware"Colin Ian King2016-09-011-1/+1
| | | | | | | | | | | | | | Trivial fix to spelling mistake in dev_dbg message. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: comedi: s626: fix line over 80 characters issueRavishankar Karkala Mallikarjunayya2016-08-211-1/+2
| | | | | | | | | | | | | | | | | | This fixes up a line over 80 characters issues found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: replace le16_to_cpu() with usb_endpoint_maxp()Cheah Kok Cheong2016-08-213-10/+10
| | | | | | | | | | | | | | | | | | Use macro introduced in commit 939f325f4a0f ("usb: add usb_endpoint_maxp() macro") Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi/drivers: Fixed sparse warningsNayeemahmed Badebade2016-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | Fixed below sparse warnings in dt2811.c warning: symbol 'dt2811_clk_dividers' was not declared. Should it be static? warning: symbol 'dt2811_clk_multipliers' was not declared. Should it be static? Signed-off-by: Nayeemahmed Badebade <itachi.opsrc@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: ni_at_a2150: fix block commentsH Hartley Sweeten2016-08-211-58/+45
| | | | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line 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>
* | staging: comedi: ni_pcidio: fix block commentsH Hartley Sweeten2016-08-211-47/+48
| | | | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line 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>
* | staging: comedi: ni_atmio16d: fix block commentsH Hartley Sweeten2016-08-211-59/+47
| | | | | | | | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Move the configuration options comment into the comedi driver comment block. That's were they typically are listed. 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>
* | staging: comedi: ni_atmio: fix block commentsH Hartley Sweeten2016-08-211-87/+78
| | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines 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>
* | staging: comedi: ni_daq_dio24: fix block commentsH Hartley Sweeten2016-08-211-29/+29
| | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines 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>
* | staging: comedi: ni_mio_cs: fix block commentsH Hartley Sweeten2016-08-211-34/+33
| | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines 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>
* | staging: comedi: ni_pcimio: fix block commentsH Hartley Sweeten2016-08-211-110/+106
| | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines 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>
* | staging: comedi: ni_670x: fix block comment issuesH Hartley Sweeten2016-08-211-34/+28
| | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines 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>
* | staging: comedi: das08_cs: fix block commentsH Hartley Sweeten2016-08-211-37/+36
| | | | | | | | | | | | | | | | | | Fix the checkpatch.pl issue: WARNING: Block comments use * on subsequent lines 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>
* | staging: comedi: addi_apci_3501: add a comedi driver comment blockH Hartley Sweeten2016-08-211-0/+27
| | | | | | | | | | | | | | | | | | This comment block is used to automatically generate documentation in Comedi and Comedilib. 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>
* | staging: comedi: addi_apci_3501: remove timer/counter subdevice supportH Hartley Sweeten2016-08-212-197/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is for a simple 4/8 channel analog output board with 2 isolated digital inputs and 2 isolated digital outputs. Support for these subdevices is provided by the driver. The boards also has a watchdog timer that can be used to reset the analog outputs. It can also be used as a general purpose 12-bit timer when the watchdog function is not necessary. The current support code for this subdevice is broken. It does not follow the comedi API and requires some out-of-tree patches in order to even work. Remove the subdevice support. If a proper register map can be located for this board we can add support back later. 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>
* | staging: comedi: plx9080.h: rename some macros for consistencyIan Abbott2016-08-213-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | Most of the macros in "plx9080.h" that define register values are single-bits flags of the form `PLX_<REG>_<FLAG>`, or are constant, multi-bit values of the form `PLX_<REG>_<FIELD>_<VAL>`, or are non-constant, function-like macros of the form `PLX_<REG>_<FIELD>(x)`. Some of the macros for constant, multi-bit values do not currently fit the pattern, so rename them for consistency. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: plx9080.h: define PLX_<REG>_TO_<FIELD>(r) macrosIan Abbott2016-08-211-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various macros in "plx9080.h" take the form `PLX_<REG>_<FIELD>(x)`, where `<REG>` is a register name, `<FIELD>` is a field within the register, and `x` is a value for the field specified by the caller. The macros construct a partial register register with the specified field value placed in the appropriate bits of the register value, and other bits of the register value zeroed. Add corresponding macros of the form `PLX_<REG>_TO_<FIELD>(r)` that extract a field value from a specified register values. Remove macros of the form `PLX_<REG>_<FIELD>_SHIFT` that specified the bit position of a field within a register value as they are no longer useful. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: comedi: drivers: usbduxfast: don't print error when allocating urb ↵Wolfram Sang2016-08-151-3/+1
|/ | | | | | | | | fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: avoid using timevalArnd Bergmann2016-06-171-4/+5
| | | | | | | | | | | | | | | | Comedi uses 32-bit seconds for its timestamps, on both 32-bit and 64-bit machines. For all I can tell, this was originally meant as a 'timespec', which would overflow in 2038 because of the use of a signed 'long' on 32-bit machines, but it is now used as an array of two unsigned 'lsampl_t' values in comedilib, which will only overflow in 2106, on both 32-bit and 64-bit machines. In an effort to get rid of all uses of 'struct timeval' in the kernel, this replaces the internal code with a call to ktime_get_real_ts64() and a comment at the location of the conversion. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: dt2817: Coding style issue fixed.Ravishankar Karkala Mallikarjunayya2016-06-171-32/+32
| | | | | | | | This fixes up a WARNING: 'Block comments use a trailing */ on a separate line' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: dt2815: Comment issue fixedRavishankar Karkala Mallikarjunayya2016-06-171-70/+70
| | | | | | | | This fixes up a WARNING: 'Block comments use a trailing */ on a separate line' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: dt2814: Block comment issue fixedRavishankar Karkala Mallikarjunayya2016-06-171-35/+37
| | | | | | | | This fixes up a WARNING: 'Block comments use a trailing */ on a separate line' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: serial2002: Fix unnecessary cast styling issueChris Cesare2016-06-171-1/+4
| | | | | | | | | | | | checkpatch.pl warns that a cast of 1 to (long long) is unnecessary. Remove the cast and also add code to check and make sure that maxdata_list[chan] is not shifted too far, as suggested by Ian Abbott. Signed-off-by Chris Cesare <chris.cesare@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: serial2002: Fix bare unsigned styling issueChris Cesare2016-06-171-1/+1
| | | | | | | | | | checkpatch.pl warns about a bare unsigned. Add type int to make explicit and suit the coding style. Signed-off-by Chris Cesare <chris.cesare@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: fix comment issue fixed for das800.cRavishankar Karkala Mallikarjunayya2016-06-171-51/+51
| | | | | | | | | This is a patch to the das800.c file that fixes up a WARNING: 'Block comments use a trailing */ on a separate line' found by the checkpatch.pl tool Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: Block comment issue fixed for das16.cRavishankar Karkala Mallikarjunayya2016-06-171-2/+4
| | | | | | | | | This is a patch to the das16.c file that fixes up a WARNING: 'Block comments use a trailing */ on a separate line' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: fix blank line issue in das16.cRavishankar Karkala Mallikarjunayya2016-06-171-0/+1
| | | | | | | | This is a patch to the das16.c file that fixes up a blank line after function/struct/union/enum check found by the checkpatch.pl tool Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: dmm32at: fix BIT macro issue.Ravishankar Karkala Mallikarjunayya2016-06-171-48/+50
| | | | | | | | | | This Replace all occurences of (1<<x) by BIT(x) and DMM32AT_CTRL_PAGE(x), DMM32AT_AI_CFG_SCINT(x) macros to get rid of checkpatch.pl "CHECK" output "Prefer using the BIT macro" Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: comedi: Used unsigned int instead of unsigned issue in jr3_pci.cRavishankar Karkala Mallikarjunayya2016-06-171-2/+2
| | | | | | | | | | This is a patch to the jr3_pci.c file that fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud