Граф коммитов

481005 Коммитов

Автор SHA1 Сообщение Дата
Sudip Mukherjee e29d3ebcda staging: rtl8712: remove unused variables
unused variables are removed. These variables were only assigned some
values and after that they were never being used. So they are safe to
be removed , and it has been build tested.

I left a call to r8712_read32(padapter, TCR) and
r8712_read8(padapter, SDIO_HCPWM) .

r8712_read32() and r8712_read8() is ultimately calling usb_read32()
and usb_read8() respectively. and they are again calling
r8712_usbctrl_vendorreq().
this r8712_usbctrl_vendorreq() is communicating through the usb bus
and is sending and receiving the control msg.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:37:26 +08:00
Rasmus Villemoes eecc515a1b staging: rtl8712: Remove redundant cast
struct firmware::data has type const u8*, as does *ppmappedfw, so the
cast to u8* is unnecessary and slightly confusing.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:32:41 +08:00
Brian Vandre 0c05a5d663 Staging: iio: adc: fix line over 80 characters
This fixes the 2 checkpatch.pl warnings:
WARNING: line over 80 characters

Signed-off-by: Brian Vandre <bvandre@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:30:47 +08:00
Fabio Falzoi 506fe17dae Staging: rts5208: helper function to enable interrupts during reset
Define the helper function rtsx_enable_pcie_intr to shorten the
rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpente@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:28:51 +08:00
Fabio Falzoi 5d069c8886 Staging: rts5208: helper function to manage aspm during reset
Define the helper function rtsx_reset_aspm to shorten the
rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpente@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:28:51 +08:00
Chen Weixiang b7da2d68bb staging: ft1000: do not initialise statics to 0 or NULL
Remove following checkpatch.pl error from ft1000/ft1000-usb/ft1000_debug.c
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Chen Weixiang <weixiang.chen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:27:46 +08:00
Soren Brinkmann 4baa70f69d staging: clocking-wizard: Contain macro argument in parenthesis
A macro doing some arithmetic to calculate a register offset, did not
contain an argument to the macro in parentheses, potentially leading to
unexpected results when using that macro with arithmetic expressions as
argument.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:25:53 +08:00
Nicky Chorley 79bffc5344 Staging: vt6655: Remove C99 comments
This patch fixes the following errors identified by
checkpatch.pl:

ERROR: do not use C99 // comments
36: FILE: card.h:36:
//

ERROR: do not use C99 // comments
37: FILE: card.h:37:
// Loopback mode

ERROR: do not use C99 // comments
38: FILE: card.h:38:
//

ERROR: do not use C99 // comments
39: FILE: card.h:39:
// LOBYTE is MAC LB mode, HIBYTE is MII LB mode

ERROR: do not use C99 // comments
41: FILE: card.h:41:
#define CARD_LB_MAC             MAKEWORD(MAC_LB_INTERNAL, 0)   // PHY must ISO, avoid MAC loopback packet go out

ERROR: do not use C99 // comments
44: FILE: card.h:44:
#define DEFAULT_MSDU_LIFETIME           512  // ms

ERROR: do not use C99 // comments
45: FILE: card.h:45:
#define DEFAULT_MSDU_LIFETIME_RES_64us  8000 // 64us

ERROR: do not use C99 // comments
47: FILE: card.h:47:
#define DEFAULT_MGN_LIFETIME            8    // ms

ERROR: do not use C99 // comments
48: FILE: card.h:48:
#define DEFAULT_MGN_LIFETIME_RES_64us   125  // 64us

ERROR: do not use C99 // comments
175: FILE: card.h:175:
#endif // __CARD_H__

Signed-off-by: Nicky Chorley <ndchorley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:20:17 +08:00
Rasmus Villemoes c42645a2c5 staging: vt6655: Remove redundant cast
Both sides have type const struct iw_handler_def*, so the cast is
unnecessary and confusing.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:19:38 +08:00
Greg Donald d59d6f5d38 staging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errors
Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:48:43 +08:00
Paul McQuade 422caed999 staging: rtl8188eu: hal: space required
ERROR: space required before the open brace '{'

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:48:32 +08:00
Koray Gulcu 7efa16c3b0 staging: rtl8192u: Fix checkpatch.pl warnings
This patch fixes "line over 80 characters" warnings found in the first patch by breaking u4bAcParam's calculation down into a few steps.

Signed-off-by: Koray Gulcu <koray.gulcu@ozu.edu.tr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:43:41 +08:00
Koray Gulcu 7d95983735 staging: rtl8192u: Fix sparse warnings of r8182U_core
This patch fixes the following endianness warnings found by sparse running with CF=-D__CHECK_ENDIAN__:

drivers/staging/rtl8192u/r8192U_core.c:1794:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:10:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:10:    got int
drivers/staging/rtl8192u/r8192U_core.c:1794:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:13:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:13:    got int
drivers/staging/rtl8192u/r8192U_core.c:1794:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:16:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:16:    got int
drivers/staging/rtl8192u/r8192U_core.c:1794:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:19:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:19:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:10:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:10:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:13:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:13:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:16:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:16:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:19:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:19:    got int
drivers/staging/rtl8192u/r8192U_core.c:1838:34: warning: cast from restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1839:34: warning: cast from restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1840:34: warning: cast from restricted __le16

Signed-off-by: Koray Gulcu <koray.gulcu@ozu.edu.tr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:43:41 +08:00
Eric Rost 71077bb2fc staging: skein: Removes unneeded #define
Removes unneeded #define SKEIN_PORT_CODE since skein_port.h is
nonexistent.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:39:58 +08:00
Eric Rost c4597c4426 staging: skein: Inlines rotl_64
Inlines the rotl_64 macro.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:39:58 +08:00
Eric Rost 075c267566 staging: skein: Adds Loadable Module Support
Adds loadable module support to the Skein Hashing Algorithm driver.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:39:58 +08:00
Eric Rost f96d8ced8e staging: skein: Adds CryptoAPI Support
Adds CryptoAPI support to the Skein Hashing Algorithm driver.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:39:58 +08:00
Eric Rost c17cdeb419 staging: skein: Renames skein to skein_base
Renames skein.c to skein_base.c and skein.h to skein_base.h in
preparation for naming loadable module skein.ko

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:39:58 +08:00
Eric Rost 24443a244b staging: skein: Collapses threefish module
Collapses threefish module into skein module.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:39:58 +08:00
Mariusz Gorski 828ebb8f82 staging: lustre: Use __init and __exit markers for lifecycle functions
Apply __init marker to module's init function and __exit to module's
exit function as they both have no other usage.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:35:16 +08:00
Dan Carpenter 87ebccf97f staging: lustre: validate size in ll_setxattr()
If size is smaller than the lov_user_md struct then we are reading
beyond the end of the buffer.  I guess this is an information leak or it
could cause an Oops if the memory is not mapped.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:33:11 +08:00
Dan Carpenter 85bcfab469 staging: lustre: validate size in lustre_posix_acl_xattr_filter()
This is mostly to silence static checker complaints.

In theory the problem here is that if size is in the 1-3 range then we
don't allocate enough memory for the posix_acl_xattr_header struct and
it results in memory corruption.  But in reality kmalloc() return values
are aligned at sizeof(long) so corrupting this small amount of data is
not harmful.

The "size" variable should be type size_t.  The value of size is checked
in setxattr() so we know it is a number between "0 - XATTR_SIZE_MAX".
There is no need to check for negative sizes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:33:11 +08:00
Greg Donald 31e7213ab2 drivers: staging: lustre: Fix "spaces required around that '='" errors
Fix checkpatch.pl "spaces required around that '='" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:30:28 +08:00
Greg Donald 544426100b drivers: staging: lustre: Fix "'foo * bar' should be 'foo *bar'" errors
Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:30:28 +08:00
Greg Donald e9e2fa6958 drivers: staging: lustre: Fix 'that open brace { should be on the previous line' errors
Fix checkpatch.pl 'that open brace { should be on the previous line' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:30:27 +08:00
Greg Donald 557732ad67 drivers: staging: lustre: Fix "space prohibited before that close parenthesis ')'" errors
Fix checkpatch.pl "space prohibited before that close parenthesis ')'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:30:27 +08:00
Dan Carpenter 92a1daba3a staging: lustre: silence a static checker warning
Static checkers warn that if  cfs_cpt_table_print() returns an error
other than -EFBIG, then it would lead to a double free.  This is true
but cfs_cpt_table_print() only returns -EFBIG on error so it also won't
happen in real life.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:25:23 +08:00
Rickard Strandqvist 22e1dd69fe staging: lustre: lustre: ptlrpc: sec.c: Replacing strncat with strlcat to avoid overwrite size
Changed from using strncat with strlcat to avoid overwrite the max size.
Take the opportunity to change a snprint to strlcpy.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Acked-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:25:23 +08:00
Anh Le 5a13503ecd Staging: lustre: llite: fix some sparse warnings about userspace pointer
Add __user macro to the function declarations that accept userspace pointers as
arguments.

Signed-off-by: Anh Le <anhlq2110@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:25:23 +08:00
Oleg Drokin 0017af422b staging/lustre/quota: Get rid of compat quota code
Nobody should be using any fo the old lustre 1.8 era tools
anymore, so drop compatibility with those.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:21:55 +08:00
Oleg Drokin 13a7de7bbc staging/lustre: get rid of deprecaed acl mount option code
This is long since unused code, so get rid of it.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:21:55 +08:00
Oleg Drokin 0237d9dc94 staging/lustre/ptlrpc: get rid of lustre 1.8 compatible checksums
Old version of lustre (1.8) calculated RPC checksums differently,
but the compat code is no longer important since in-kernel
version of lustre is nto compatible with 1.8 lustre servers
(that are long deprecated too).

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:21:55 +08:00
Filipe Gonçalves 1bca2822b4 drivers/staging: Removed unnecessary check for LUSTRE_VERSION_CODE
Given that this code is now part of the kernel tree, the #ifdef directive comparing LUSTRE_VERSION_CODE to the kernel version is no longer needed.

As a side effect, this will also remove the sparse error "directive in argument list".

Signed-off-by: Filipe Gonçalves <filipe@codinghighway.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:21:55 +08:00
Ian Abbott 73e0e4dfed staging: comedi: comedi_test: fix timer lock-up
Commit 2405124744 ("staging: comedi: comedi_test: use
comedi_handle_events()") resulted in the timer routine
`waveform_ai_interrupt()` calling `comedi_handle_events()` instead of
`comedi_events()`.  That had the advantage of automatically stopping the
acquisition on overflow/error/end-of-acquisition conditions (by calling
the comedi subdevice's "cancel" handler), but currently results in the
timer routine locking when one of those conditions occur.  This is
because the "cancel" handler `waveform_ai_cancel()` calls
`del_timer_sync()`.

Fix it by adding a bit to the device private data that indicates whether
the acquisition is active or not, and changing the "cancel" handler to
use `del_timer()` instead of `del_timer_sync()`.  The bit is set when
starting the acquisition, cleared when ending the acquisition (in the
"cancel" handler), and tested in the timer routine, which will do
nothing if the acquisition is inactive.  Also, make sure any scheduled
timeout event gets cancelled when the low-level device gets "detached"
from the comedi core by calling `del_timer_sync()` in the "detach"
handler `waveform_detach()`.

Fixes: 2405124744 ("staging: comedi: comedi_test: use comedi_handle_events()")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:15:07 +08:00
Ian Abbott bf33eb4b4f staging: comedi: introduce some sample size manipulation functions
Introduce a few static inline helper functions:

`comedi_bytes_per_sample(s)` is the same as the existing
`bytes_per_sample(s)` and determines the size of a comedi sample in
bytes.  (`bytes_per_sample(s)` will be removed.)

`comedi_sample_shift(s)` determines the log2 of the comedi sample size,
so it can be used in bit-shift operations to multiply or divide by the
sample size.

`comedi_bytes_to_samples(s, nbytes)` converts a number of bytes to a
number of samples (rounding down).

`comedi_samples_to_bytes(s, nsamples)` converts a number of samples to a
number of bytes.

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>
2014-10-29 16:12:41 +08:00
H Hartley Sweeten 7885b070b8 staging: comedi: addi_apci_1564: remove private data 'mode_select_register'
This driver currently passes the timer channel as the data[5] element to the
timer (*insn_config) function. This is stored in the private data and use in
the timer (*insn_read) and (*insn_write) functions to read/write the timer.

This is just wrong, comedi passes the channel number in the insn->chanspec.
Use that instead and remove the private data member.

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>
2014-10-29 16:06:01 +08:00
H Hartley Sweeten 367ff14edd staging: comedi: addi_apci_1564: board has 3 timers
According to ADDI-DATA, the APCI-1564 only has 3 timers. There are some
customer specific boards with 4 timers but they use out of tree drivers.

Now that the timer 'channels' are handled correctly in the subdevice
functions, fix the number of timer channels for the subdevice and remove
the code that would access a 4th timer.

Also, remove the unnecessary initialzation of the subdevice 'len_chanlist'.
That member is only used by subdevices that support async commands.

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>
2014-10-29 16:06:01 +08:00
H Hartley Sweeten b3ba2be24c staging: comedi: addi_apci_1564: remove APCI1564_COUNTER[1234] defines
These defines don't add any significant clarity to the driver. 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>
2014-10-29 16:06:01 +08:00
H Hartley Sweeten ac584af599 staging: comedi: me4000: fix firmware downloading
Convert this driver to use comedi_load_firmware() to download the firmware
to the board.

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>
2014-10-29 16:06:01 +08:00
H Hartley Sweeten 0cf5efaa4b staging: comedi: comedi_buf: absorb __comedi_buf_write_alloc()
This function is only called by comedi_buf_write_alloc(). Absorb it and remove
the unused 'strict' parameter.

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>
2014-10-29 16:03:16 +08:00
H Hartley Sweeten e19a3c9724 staging: comedi: comedi_buf: absorb comedi_write_array_to_buffer()
This function is only called by comedi_buf_write_samples(). Absorb it.

The buffer overflow was already checked so the overflow check of
comedi_buf_write_alloc() can be removed.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten 8f90726196 staging: comedi: comedi_buf: don't export comedi_write_array_to_buffer()
All the comedi drivers have been converted to use comedi_buf_write_samples().
This function is now only used internally by comedi_buf. Remvoe the export.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten 0ce64e6517 staging: comedi: comedi_buf: remove comedi_buf_put()
All comedi drivers now use comedi_buf_write_samples() to add the samples to
the async buffer. Remove this unused function.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten 7dd1b528c1 staging: comedi: pcmuio: use comedi_buf_write_samples()
The dev->read_subdev used in this driver for async commands returns 32-bit samples
and should have the SDF_LSAMPL subdev_flag set. It also returns the full scan with
each sample so it should have the SDF_PACKED subdev_flag set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add the sample
to the async buffer.

The COMEDI_CB_BLOCK and COMEDI_CB_EOS events will be automatically handled by the
core. Remove the unnecessary events in the driver.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten ff5eb046cf staging: comedi: pcmmio: use comedi_buf_write_samples()
The dev->read_subdev used in this driver for async commands returns 32-bit samples
and should have the SDF_LSAMPL subdev_flag set. It also returns the full scan with
each sample so it should have the SDF_PACKED subdev_flag set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add the sample
to the async buffer.

The COMEDI_CB_BLOCK and COMEDI_CB_EOS events will be automatically handled by the
core. Remove the unnecessary events in the driver.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten dbe81a93f4 staging: comedi: ni_pcidio: use comedi_buf_write_samples()
Use comedi_buf_write_samples() to add the sample to the async buffer. The 32-bit
sample size is automatically determined due to the subddev_flag SDF_LSAMPL.

The async event COMEDI_CB_BLOCK will be automatically set by the core. Remove the
unnecessary event in the driver.

This driver also has the SDF_PACKED subdev_flag set so the core will automatically
set the COMEDI_CB_EOS event after adding the sample.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten 2a07616cd9 staging: comedi: amplc_dio200_common: use comedi_buf_write_samples()
The dev->read_subdev used in this driver for async commands returns the
full scan with each sample so it should have the SDF_PACKED subdev_flag
set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add
the sample to the async buffer.

The async events will set properly by the core. A dev_warn() message will
also be output by the core if the buffer overflows. Remove the unnecessary
events and dev_err() message in the driver.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten 4c704690e7 staging: comedi: addi_apci_2032: use comedi_buf_write_samples()
The dev->read_subdev used in this driver for async commands returns the
full scan with each sample so it should have the SDF_PACKED subdev_flag
set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add
the sample to the async buffer.

The core sets the async events appropriately. Remove the unnecessary
event handling in the driver.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten 435efc8a43 staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()
Use comedi_buf_write_samples() to add the samples to the async buffer.

The COMEDI_CB_EOS and COMEDI_CB_OVERFLOW events will be automatically
handled by the core. Remove the unecessary handling in the driver.

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>
2014-10-29 16:03:15 +08:00
H Hartley Sweeten 290d028e04 staging: comedi: usbdux: use comedi_buf_write_samples()
Use comedi_buf_write_samples() to add the sample to the async buffer.

The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set
by the core. Remove the unnecessary events in the driver.

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>
2014-10-29 16:03:15 +08:00