staging: comedi: adl_pci9118: use comedi_fc helpers to validate timer args
Use the comedi_fc helper, cfc_check_trigger_arg_is(), to validate the
arguments for the TRIG_TIMER command sources. Pass the local variable to
i8253_cascade_ns_to_timer() instead of the cmd argument. This value
is modified by that function to return the actual time (in nanoseconds)
that the timer will be programmed with based on the calculated divisors.
The cfc_check_trigger_arg_is() helper will then validate that the argument
is that value and modify it if not.
Use cfc_check_trigger_arg_min() to do validate the cmd->scan_begin_arg
when the scan_begin_src is TRIG_TIMER and the convert_src is TRIG_NOW.
All the arguments are unsigned int, change the local variable to an
unsigned int and rename it for aesthetic reasons.
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: dt3000: use comedi_fc helpers to validate timer args
Use the comedi_fc helper, cfc_check_trigger_arg_is(), to validate the
cmd->scan_begin_arg for the scan_begin_src TRIG_TIMER. Pass the local
variable to dt2k_ns_to_timer() instead of the cmd argument. This value
is modified by that function to return the actual time (in nanoseconds)
that the timer will be programmed with based on the calculated divisor.
The cfc_check_trigger_arg_is() helper will then validate that the
cmd->cscan_begin_arg is that value and modify it if not.
Also use cfc_check_trigger_arg_is() to validate the cmd->convert_arg
using the same logic.
Use cfc_check_trigger_arg_min() to do validate the cmd->scan_begin_arg
when the convert_src and scan_begin_src are both TRIG_TIMER.
All the arguments are unsigned int, change the local variable to an
unsigned int and rename it for aesthetic reasons.
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: adv_pci1710: use comedi_fc helpers to validate timer args
Use the comedi_fc helper, cfc_check_trigger_arg_is(), to validate the
cmd->convert_arg for the convert_src TRIG_TIMER. Pass the local variable
to i8253_cascade_ns_to_timer() instead of the cmd argument. This value
is modified by that function to return the actual time (in nanoseconds)
that the timer will be programmed with based on the calculated divisors.
The cfc_check_trigger_arg_is() helper will then validate that the
cmd->convert_arg is that value and modify it if not.
The minimum validation is not needed. That was already handled in Step 3.
All the arguments are unsigned int, change the local variable to an
unsigned int and rename it for aesthetic reasons..
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: adl_pci9111: use comedi_fc helpers to validate timer args
Use the comedi_fc helper, cfc_check_trigger_arg_is(), to validate
the cmd->convert_arg for the convert_src TRIG_TIMER. Pass the local
variable to i8253_cascade_ns_to_timer() instead of the cmd argument.
This value is modified by that function to return the actual time
(in nanoseconds) that the timer will be programmed with based on the
calculated divisors. The cfc_check_trigger_arg_is() helper will then
validate that the cmd->convert_arg is that value and modify it if not.
Also use cfc_check_trigger_arg_is() to validate that the
cmd->scan_begin_arg is the calculate value and modify it if not.
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: vt6655: refactor iwctl_giwaplist() to avoid -Wframe-larger-than warn.
This commit refactors the iwctl_giwaplist() function so that the sparse
warning "the frame size of 1292 bytes is larger than 1024 bytes
[-Wframe-larger-than=]" is no more.
The root cause of this warning were two arrays allocated on the stack
and this commit changes this - these arrays are now kmalloc'ed. As a
result the function is refactored and hopefully stil working the same.
I were not able to test these changes so at least the carefull review
is more than welcomed.
Note that my changes has broadened the set of error codes that this
function can return. The new error code is ENOMEM. Luckily, this is
no issue.
Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Added spaces needed in the proper places to address:
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required after that ';' (ctx:VxV)
ERROR: space required after that close brace '}'
ERROR: space required before the open brace '{'
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
Ian Abbott [Tue, 27 May 2014 14:06:17 +0000 (15:06 +0100)]
staging: comedi: remove in_request_module
The `in_request_module` member of `struct comedi_device` is only ever
set to `false`, so remove the code that checks for it being `true` and
remove the member.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sachin Kamat [Tue, 27 May 2014 09:55:47 +0000 (15:25 +0530)]
staging: rtl8192ee: Fix build error
Fixes the followign build error:
drivers/staging/rtl8192ee/btcoexist/halbtc8723b1ant.c:1387:6: error: called object is not a function or function pointer
("[BTCoex], Wifi non connected-idle + BT Busy!!\n"));
Paul Bolle [Mon, 26 May 2014 19:09:10 +0000 (21:09 +0200)]
staging: comedi: remove check for CONFIG_KMOD
The comedi driver was added in v2.6.29. That's the same release that
removed the Kconfig symbol KMOD. So the code behind a test for its
macro has been hidden since it was in staging. Remove it.
Remove a useless assignment to "dev->in_request_module" too. That
variable seems pointless anyhow, but that's a different issue.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Bolle [Mon, 26 May 2014 19:18:01 +0000 (21:18 +0200)]
staging: ctx1e1: remove checks for three macros
When the ctx1e1 driver was added in v2.6.35 it contained checks for
CONFIG_SBE_HDLC_V7, CONFIG_SBE_WAN256T3_HDLC_V7, and
CONFIG_SBE_WAN256T3_NCOMM (and MODULE variants). The related Kconfig
symbols didn't exist then. They still don't exist now. Remove these
checks.
Do some related cleaning up and remove the unused V7() macro too.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Bolle [Mon, 26 May 2014 19:26:57 +0000 (21:26 +0200)]
staging: lirc: remove checks for CONFIG_LIRC_SERIAL_NSLU2
When support for homebrew serial port receivers was added in v2.6.36 its
code contained checks for CONFIG_LIRC_SERIAL_NSLU2. The related Kconfig
symbol didn't exist then. It still doesn't exist now. Remove these checks.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Bolle [Mon, 26 May 2014 19:40:46 +0000 (21:40 +0200)]
staging: rtl8192u: remove checks for CONFIG_RTL8192_PM
When the rtl8192u driver was added in v2.6.33 its code contained checks
for CONFIG_RTL8192_PM. The related Kconfig symbol didn't exist then. It
still doesn't exist now. Remove these checks.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Bolle [Mon, 26 May 2014 19:47:11 +0000 (21:47 +0200)]
staging: tidspbridge: check for CONFIG_SND_OMAP_SOC_MCBSP
Commit d0f47ff17f29 ("ASoC: OMAP: Build config cleanup for McBSP")
removed the Kconfig symbol OMAP_MCBSP. It left two checks for
CONFIG_OMAP_MCBSP untouched.
Convert these to checks for CONFIG_SND_OMAP_SOC_MCBSP. That must be
correct, since that re-enables calls to functions that are all found in
sound/soc/omap/mcbsp.c. And that file is built only if
CONFIG_SND_OMAP_SOC_MCBSP is defined.
Fixes: d0f47ff17f29 ("ASoC: OMAP: Build config cleanup for McBSP") Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The Kconfig symbol IEEE80211_CRYPT_TKIP was renamed to
LIB80211_CRYPT_TKIP in commit 274bfb8dc5ff ("lib80211: absorb crypto
bits from net/ieee80211"). So when rtl8192u was added as a staging
driver in v2.6.33 its checks for CONFIG_IEEE80211_CRYPT_TKIP were
already outdated. Use CONFIG_LIB80211_CRYPT_TKIP instead, as was clearly
intended.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Mon, 26 May 2014 19:06:06 +0000 (14:06 -0500)]
staging: r8821ae: Fix potential problem with rate control registration
The zero day testing facility reported a problem with duplicate
registration of the rate-control algorithm. Although not yet reported,
this driver needs the same fix.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Mon, 26 May 2014 19:06:05 +0000 (14:06 -0500)]
staging: r8192ee: Fix build errors when PCI is not available
A build of this driver fails when PCI is not selected. It would also
fail if MAC80211 is not selected. Kconfig is fixed to handle these
conditions, and to select additional necessary components.
Reported-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Mon, 26 May 2014 19:06:04 +0000 (14:06 -0500)]
staging: r8192ee: Fix kernel WARN splat associated with rate control
The 0day kernel testing robot got the kernel warning caused by trying
to register a particular rate-control algorithm more than once. I believe
that the core already protects against a particular driver doing the
registration more than once, but an analysis of the code reveals that
the identical name is used for the rtlwifi drivers in the regular
wireless tree, and the staging drivers r8192ee and r8821ae. The fix
is to rename the algorithm used in r8192ee.
navin patidar [Mon, 26 May 2014 16:05:23 +0000 (21:35 +0530)]
staging: rtl8188eu: Remove function rtw_hal_dm_deinit()
rtw_hal_dm_deinit() calls rtl8188e_deinit_dm_priv() using funtion pointer.
rtl8188e_deinit_dm_priv() has empty defination, so we can remove
rtw_hal_dm_deinit() and later rtl8188e_deinit_dm_priv() also will be
removed.