staging: comedi: adl_pci9118: tidy up check_channel_list()
Rename this function to give it namespace associated with the driver.
Currently this function is called by both the AI (*do_cmdtest) and the (*do_cmd)
functions. It really only needs to be called by the (*do_cmdtest) to validate
that the chanlist meets the requirements of the hardware. It's only called by
the (*do_cmd) to verify that the scan length is not to large after adding the
extra samples needed to satisfy the DMA.
Move the extra scan length check into the (*do_cmd) function and remove the
unnecessary parameters 'frontadd' and 'backadd'.
Tidy up the reset of the 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>
staging: comedi: adl_pci9118: remove unnecessary check in check_channel_list()
Step 3 of the AI (*do_cmdtest) validates that the cmd->chanlist_len is >= 1. If
it's not the (*do_cmdtest) fails and check_channel_list() is never called. This
This function is also called by the AI (*do_cmd) and the comedi core ensures
that the async command has a valid chanlist. Remove the unnecessary 'n_chan'
check.
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>
This inline function just returns the bits needd to enable
a calibration source. For aethetics, absorb it into the callers.
Sorten the variable name in the private data used to hold the
current calibration source.
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>
The analog output and analog input interrupts are currently cleared
as they are handled. Refactor the code to gather all the bits needed
to clear the interrupts and do it once at the end of the interrupt
handler.
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>
Larry Finger [Mon, 19 Oct 2015 03:14:48 +0000 (22:14 -0500)]
staging: rtl8712: Add device ID for Sitecom WLA2100
This adds the USB ID for the Sitecom WLA2100. The Windows 10 inf file
was checked to verify that the addition is correct.
Reported-by: Frans van de Wiel <fvdw@fvdw.eu> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Frans van de Wiel <fvdw@fvdw.eu> Cc: Stable <stable@vger.kernel.org> [All stable versions] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: xgifb: Replace udelay, mdelay functions with usleep_range
This patch fixes the checkpatch.pl check:
CHECK: usleep_range is preferred over udelay.
Replace mdelay with usleep_range function too.
Add 1 millisecond to the delay time to get a
reasonable upper limit which saves one wakeup call.
Do same throughout the file.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The calcPllValues currently uses arrays of PLL parametres that contain
possible PLL control register field values and redundant data that is
calculated according to those values. The usage of these arrays can be
replaced with simple arithmetics.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: sm750fb: Replace include <asm/*.h> with include <linux/*.h>
Problem found using checkpatch.pl
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Frederic Saunier [Thu, 22 Oct 2015 01:52:48 +0000 (21:52 -0400)]
staging: lustre: remove last entry of libcfs_netstrfns[]
Currently NID string handling test for the last entry,
and last entry has .nf_type == (__u32) -1. If we ask
for a non existent LND we hit the last entry which then
calls a strlen on a NULL which causes a error. We can
avoid this problem if we just remove the last entry
since it is not used for anything except as a last
entry marker.
James Simmons [Thu, 22 Oct 2015 01:52:44 +0000 (21:52 -0400)]
staging: lustre: move cfs_ip_addr_* function from kernel libcfs to LNet
Both of cfs_ip_addr_parse and cfs_ip_addr_match which are located in
libcfs kernel module are used only for LNet so move this into the
nidstring handling code where it belongs. Also create user land
versions of these functions in the libcfs user land library.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/15085 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Thu, 22 Oct 2015 01:52:43 +0000 (21:52 -0400)]
staging: lustre: move struct netstrfns to nidstr.h
The reason struct netstrfns exist in nidstrings.c
was to avoid forward decleration errors. The best
way to handle this instead is to move this structure
to a header file. Since this structure is used in
the userland utilities as well so we place it in
nidstr.h which is exposed to userland.
James Simmons [Thu, 22 Oct 2015 01:52:40 +0000 (21:52 -0400)]
staging: lustre: move nidstring handling to LNet layer
Moved the source file nidstring.c from libcfs to lnet
since that is the only place it is used. With the
move of nidstring to lnet some functions in libcfs
need to be exported. In later patches those functions
that are only used by LNet also will be moved to the
LNet layer. Also add in missing MAX_NUMERIC_VALUE
defination.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gregoire Pichon [Thu, 22 Oct 2015 01:52:39 +0000 (21:52 -0400)]
staging: lustre: add a service that prints a nidlist
The libcfs already provides services to parse a string into a nidlist
and to match a nid into a nidlist. This patch implements a service
that prints a nidlist into a buffer.
This is required for instance to print the nosquash_nids parameter
of the MDT procfs component.
Additionally, this patch fixes a bug in return code of
parse_addrange() routine, so that parsing of nids including
a * character works fine ('*@elan' for instance).
Fix lustre/ptlrpc/client.c block comments following the Coding Style
preferred format for multi-line and single-line comments:
/*
* This is the preferred style for multi-line
* comments in the Linux kernel source code.
* Please use it consistently.
*
* Description: A column of asterisks on the left side,
* with beginning and ending almost-blank lines.
*/
Included some minor textual fixes to get some comments on a single line.
Cristina Moraru [Sun, 18 Oct 2015 10:31:57 +0000 (13:31 +0300)]
staging: lustre: Replace aligned packed with packed
Replace __aligned__((packed)) with __packed in order to follow
the best practices and to fix checkpatch.pl warning:
'WARNING: __packed is preferred over __attribute__((packed))'
Glen Lee [Tue, 20 Oct 2015 08:14:03 +0000 (17:14 +0900)]
staging: wilc1000: init_irq: change argument and use netdev private wilc
This patch changes function argument type wilc with net_device and use
netdev private data member wilc instead of p_nic.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:14:02 +0000 (17:14 +0900)]
staging: wilc1000: start_ap: use netdev private data wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:14:01 +0000 (17:14 +0900)]
staging: wilc1000: wilc_mgmt_frame_register: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:14:00 +0000 (17:14 +0900)]
staging: wilc1000: del_key: use netdev private wilc instead of g_linux_wlan
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:59 +0000 (17:13 +0900)]
staging: wilc1000: add_key: use netdev private wilc instead of g_linux_wlan
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:58 +0000 (17:13 +0900)]
staging: wilc1000: CfgConnectResult: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:57 +0000 (17:13 +0900)]
staging: wilc1000: wilc1000_wlan_deinit: change argument and use wilc
This patch changes function argument wilc with net_device and use nic->wilc
instead of global variable g_linux_wlan. The null check codes should be placed
before it is used so move it.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:56 +0000 (17:13 +0900)]
staging: wilc1000: chage_virtual_intf: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:55 +0000 (17:13 +0900)]
staging: wilc1000: mac_close: use netdev private wilc instead of g_linux_wlan
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:54 +0000 (17:13 +0900)]
staging: wilc1000: mac_open: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>