Ian Abbott [Mon, 21 Sep 2015 17:52:48 +0000 (18:52 +0100)]
staging: comedi: comedidev.h: tweak kernel-doc for struct comedi_async
Tweak the formatting of the kernel-doc formatted comment for `struct
comedi_async` in order to stop it generating bogus headings for text
before a colon.
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>
Ian Abbott [Mon, 21 Sep 2015 17:52:47 +0000 (18:52 +0100)]
staging: comedi: comedidev.h: use enum for COMEDI_CB_... constants
The existing constants `COMEDI_CB_EOS` etc. are in the form of macros
and have a bogus kernel-doc comment. Change them to `enum` constants so
they can be documented properly with kernel-doc.
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>
Add missing kernel-doc to the low-level COMEDI driver API functions
exported from "drivers.c" and tart up some of the existing kernel-doc
comments for consistency.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Comedi's "drivers.c" doesn't use anything from `<linux/dma-mapping.h>`,
but it does use `DMA_NONE` from `<linux/dma-direction.h>`, so replace
the appropriate `#include` directive.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:58 +0000 (17:18 +0200)]
staging: most: fix pcm_write input/output error
This patch keeps the process from sleeping after the PCM middle layer has
stopped playback by calling the pcm trigger callback. The patch is needed
to prevent aplay from causing a pcm_write Input/Output error.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:57 +0000 (17:18 +0200)]
staging: most: add poll syscall to AIM cdev
This patch adds the implementation of the poll syscall to the AIM cdev.
To have the full functionality, a helper function is needed in the
core module to retrieve the instantaneous availability of tx buffers.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:53 +0000 (17:18 +0200)]
staging: most: rename function
This patch renames the function audio_set_pcm_format(). Since the
function doesn't only set the PCM format anymore and to guard against
misunderstandings, its name needs to be changed.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:49 +0000 (17:18 +0200)]
staging: most: make hardware parameters channel exclusive
Since the PCM interface's hardware parameters are channel/substream
exclusive, the struct snd_pcm_hardware needs to be embedded in the
channel structure.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:47 +0000 (17:18 +0200)]
staging: most: add multi channel support to sound AIM
This patch adds 5.1 surround configuration with subbuffer cross-check,
when establishing a link to the core. For the sake of simplicity, only
one specific channel configuration is allowed.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:46 +0000 (17:18 +0200)]
staging: most: refactor channel structure
The struct most_c_obj has the same set of attributes for each of two AIMs.
This patch cleans up the code by introducing the new struct most_c_aim_obj
hat contains those fields.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:45 +0000 (17:18 +0200)]
staging: most: add fair buffer distribution
This patch ensures a fair distribution of buffers, when two AIMs share a
single channel. The AIMs then won't be able to use more than half of all
pre-allocated buffers of the linked channel. However, in case the channel
is not shared, the AIM can exclusively use all available buffers.
Christian Gromm [Mon, 28 Sep 2015 15:18:44 +0000 (17:18 +0200)]
staging: most: consolidate code
The function drci_rd_reg() always delivers little endian representation of
the 16-bit DCI register. The value returned by this function must always be
carefully converted from __le16 to u16 type. This patch moves all those
conversions to the function itself.
Christian Gromm [Mon, 28 Sep 2015 15:18:40 +0000 (17:18 +0200)]
staging: most: fix buffer size for DIM2
This patch reduces the DBR buffer size to prevent an overflow in the DIM2
module. It is needed, because the MediaLB hardware has problems with DBR
buffers that exceed the size of 255 messages.
Christian Gromm [Mon, 28 Sep 2015 15:18:32 +0000 (17:18 +0200)]
staging: most: fix race condition in AIM networking
If the network device is being opened right after it has been registered
via function register_netdev(), the device state is not yet consistent in
the context of function ndo_open(). This patch cares about having the
initialization done right, before the networking device is registered.
Christian Gromm [Mon, 28 Sep 2015 15:18:31 +0000 (17:18 +0200)]
staging: most: remove aim reset
This patch partly reverts a modification of function most_stop_channel()
that is trying to reset an established link between an AIM and an HDM in
all suitable places. But since the function most_stop_channel() is
stopping the data transfer it is the wrong place to do so.
Glen Lee [Thu, 24 Sep 2015 09:15:05 +0000 (18:15 +0900)]
staging: wilc1000: remove function pointer os_wait
This patch removes function pointer os_wait which is pointer of
linux_wlan_lock_timeout and just call the real name function directly.
Remove also static from linux_wlan_lock_timeout declaration.
As os_wait is deleted, structure wilc_wlan_os_func_t is useless. Delete
wilc_wlan_os_func_t, os_func and it's related codes.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:15:01 +0000 (18:15 +0900)]
staging: wilc1000: remove pointer varialbes of hif_cs
Remove hif_lock and hif_critical_section which are pointer of
g_linux_wlan->hif_cs. Remove also it's related codes.
Just use mutex varialbe g_linux_wlan->hif_cs.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:15:00 +0000 (18:15 +0900)]
staging: wilc1000: remove pointer variables of txq_add_to_head_cs
This patch removes txq_add_to_head_critical_section and txq_add_to_head_lock
which are pointer of g_linux_wlan->txq_add_to_head_cs.
Just use g_linux_wlan->txq_add_to_head_cs as argument of function.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:59 +0000 (18:14 +0900)]
staging: wilc1000: remove pointer varialbe cfg_wait and cfg_wait_event
This patch removes cfg_wait and cfg_wait_event which are pointer of
g_linux_wlan->cfg_event. No need to have pointer varialbe of it. Just use
g_linux_wlan->cfg_event.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:58 +0000 (18:14 +0900)]
staging: wilc1000: remove pointer variable of g_linux_wlan->txq_event
Remove variable txq_wait and txq_wait_event which are pointer varialbe
of g_linux_wlan->txq_event. No need to have extra pointer varialbe. Just use
g_linux_wlan->txq_event. Remove os_context.txq_wait_event, txq_wait and it's
related codes.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:57 +0000 (18:14 +0900)]
staging: wilc1000: use g_linux_wlan->rxq_cs for function arguemnt
Use mutex variable g_linux_wlan->rxq_cs instead of pointer varialbe.
No need to make extra pointer variable for the mutex. Remove
rxq_critical_section, rxq_lock and it's related codes.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:56 +0000 (18:14 +0900)]
staging: wilc1000: use g_linux_wlan->txq_spinlock not the pointer of it
Use spinlock variable g_linux_wlan->txq_spinlock itself instead of
g_wlan.txq_spinlock which is pointer of g_linux_wlan->txq_spinlock.
Delete os_context.txq_spin_lock, g_wlan.txq_spinlock and it's related codes.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:54 +0000 (18:14 +0900)]
staging: wilc1000: remove function pointer rx_complete
just call the function linux_wlan_rx_complete directly. No need for a pointer
to the functions. Remove rx_complete, wilc_wlan_net_func_t and net_func which
are not used anymore.
Finally remove static from the function linux_wlan_rx_complete.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:53 +0000 (18:14 +0900)]
staging: wilc1000: remove function pointer mac_indicate
No need for a pointer to a function. Just call linux_wlan_mac_indicate.
Remove mac_indicate and also wilc_wlan_indicate_func_t since no members in it.
Variable indicate_func is not used so delete it and related codes.
Finally remove static from the function linux_wlan_mac_indicate.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: move wilc_msgqueue.h include file
This patch moves wilc_msgqueue.h include file from wilc_oswrapper.h to
host_interface.c because message queue function as wilc_mq_create,
wilc_mq_send, wilc_mq_recv and wilc_mq_destroy are used only at
host_interface.c file.
staging: wilc1000: remove wilc_platform.h include file
This patch removes wilc_platform.h include file that is defined in
wilc_msgqueue.h file. After removing it, compilation error occurs so
that it is included two header files as <linux/semaphore.h> and
<linux/slab.h> at wilc_msgqueue.h and wilc_msgqueue.c
staging: wilc1000: move struct Message and WILC_MsgQueueHandle
This patch moves struct Message and WILC_MsgQueueHandle from
wilc_platform.h to wilc_msgqueue.h because those two structures are used
only at wilc_msgqueue.c so that it is good to be defined at
wilc_msgqueue.h
This patch removes extern declaration of *gpstrWlanOps in
coreconfigurator.c file. It is defined extern declaration in
wilc_wlan_if.h file and then is included in coreconfigurator.c file.
This patch removes CoreConfiguratorDeInit function, which is not doing
anything else except printing a PRINT_D message and returning a
s32Error. It is also removed the codes that is calling this function.
staging: wicl1000: fix dereference after free in wilc_wlan_cleanup()
The wilc_wlan_cleanup() function iterates over the list of transmission
buffers freeing all of them and then iterates over the receive buffers
list to free all of them as well.
But on the receive loop a pointer to struct txq_entry_t is dereferenced
instead of the pointer to a struct rxq_entry_t. This not only causes a
dereference to a pointer already freed but also leaks the memory in the
struct rxq_entry_t buffer.
Also, the buffer is allocated when MEMORY_STATIC is not defined no when
MEMORY_DYNAMIC is defined. So use #ifndef MEMORY_STATIC instead as it's
done in the rest of the driver to avoid leaking the buffer memory.
This patch removes unnecessary parentheses found by checkpatch.pl
Unnecessary parentheses around pstrWFIDrv->hSemTestKeyBlock
Unnecessary parentheses around pstrWFIDrv->hSemTestDisconnectBlock
Unnecessary parentheses around pstrWFIDrv->hSemGetRSSI
Unnecessary parentheses around pstrWFIDrv->hSemGetLINKSPEED
Unnecessary parentheses around pstrWFIDrv->hSemGetCHNL
Unnecessary parentheses around pstrWFIDrv->hSemInactiveTime
Unnecessary parentheses around pstrWFIDrv->gtOsCfgValuesSem
Unnecessary parentheses around pstrWFIDrv->gtOsCfgValuesSem
This patch removes CoreConfiguratorInit function, which is not doing
anything else except printing a PRINT_D message and returing a s32Error.
It is also removed the code that is calling this function.
Leo Kim [Tue, 22 Sep 2015 05:34:45 +0000 (14:34 +0900)]
staging: wilc1000: wilc_wlan_if.h: remove warnings line over 80 characters
This patch removes the warnings reported by checkpatch.pl for line over 80
characters. And also align comments which is not over 80 but to align with them.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Tue, 22 Sep 2015 05:34:43 +0000 (14:34 +0900)]
staging: wilc1000: Modify null check routine
This patch removes the potential faults which may happen when unexpectedly
getting access to invalid pointer. Return error when the invalid memory is
accessed.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
"Two bugfixes from Andy addressing at least some of the subtle NMI
related wreckage which has been reported by Sasha Levin"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/nmi/64: Fix a paravirt stack-clobbering bug in the NMI code
x86/paravirt: Replace the paravirt nop with a bona fide empty function