staging: wilc1000: remove wrapper around usleep_range()
Just call the function directly, no need for the indirection.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
If memdup_user() fails then it will return the error code in ERR_PTR. We
were checking it with IS_ERR but then again trying to free it on the
error path.
Johnny Kim [Thu, 20 Aug 2015 07:32:52 +0000 (16:32 +0900)]
staging: wilc1000: use id value as argument
The driver communicates with the chipset via the address of handlers
to distinguish async data frame. The SendConfigPkt function gets the
pointer address indicating the handlers as the last argument, but this
requires redundant typecasting and does not support the 64 bit machine.
This patch adds the function which assigns ID values instead of pointer
representing the driver handler to the address and then uses the ID
instead of pointer as the last argument of SendConfigPkt. The driver
also gets the handler's address from the ID in the data frame when it
receives them.
Signed-off-by: Johnny Kim <johnny.kim@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Just call the spinlock functions directly, no need for the indirection.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: remove wrappers around semaphore usage
Just call up/down directly, no need for a wrapper function that hides
what is really happening. Fix up some variable types to be the correct
structure pointers, not void *.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: remove wrappers around sema_init()
Just call the function directly. Also remove a pointless "deinit"
function that was empty to match the init function.
This also fixes a bug where txq_add_to_head_cs was a mutex structure
being used as a semaphore. See the fun things that happen when you use
void pointers instead of "real" types? Amazing that this worked at all,
someone got _very_ lucky. Whoever "Amr" is, they really didn't fix
BugID_4720 correctly :(
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: remove wrapper around spin_lock_init()
It's only called once, so just call the real function. Also remove the
empty "deinit" function that didn't do anything.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Just call the functions directly. Also fix the variable types to be
correct, not void *, so we have a semblance of type safety happening
now.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Just call the function, no need for a pointer to a function that calls
the function.
turtles, all the way down...
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It isn't needed, and we were checking if a buffer was not NULL multiple
times, no one had ever looked at the code :(
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: remove another useless kmalloc wrapper
A static function that just calls kmalloc(), and only used in one place.
It's obvious that the wrappers on wrappers in this driver have never
actually been reviewed...
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: remove another pointless kmalloc wrapper
Call kmalloc directly, don't make a special "atomic" function pointer to
call it instead.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
just call kmalloc directly, don't use an indirect pointer to a wrapper
function.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The config option, CONFIG_WILC1000_PREALLOCATE_DURING_SYSTEM_BOOT, was
never able to be set, so this file was never being built. Also, as
WILC_PREALLOC_AT_BOOT was never being set in the build system, remove
all code framed by that symbol.
Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: mt29f_spinand: Export OF module alias information
The SPI core always reports the MODALIAS uevent as "spi:<modalias>"
regardless of the mechanism that was used to register the device
(i.e: OF or board code) and the table that is used later to match
the driver with the device (i.e: SPI id table or OF match table).
So drivers needs to export the SPI id table and this be built into
the module or udev won't have the necessary information to autoload
the needed driver module when the device is added.
But this means that OF-only drivers needs to have both OF and SPI id
tables that have to be kept in sync and also the dev node compatible
manufacturer prefix is stripped when reporting the MODALIAS. Which can
lead to issues if two vendors use the same SPI device name for example.
To avoid the above, the SPI core behavior may be changed in the future
to not require an SPI device table for OF-only drivers and report the
OF module alias. So, it's better to also export the OF table even when
is unused now to prevent breaking module loading when the core changes.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fbtft_par_dbg(DEBUG_SET_ADDR_WIN.. ) is repeated in every
set_addr_win() handler, this could be replicated by using the kernel
function tracer instead.
Mike Rapoport [Thu, 3 Sep 2015 05:13:10 +0000 (08:13 +0300)]
staging: fbtft: remove unused bl_ops from fbtft_unregister_backlight
The only usage of bl_ops variable in fbtft_unregister_backlight function
was assigment of a value to that variable, therefore the assignment and
the variable itself can be safely removed
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quoted strings should not be split to help text grep in the source.
All quoted strings that were split have thus been merged to one unique
quoted string each to follow the code style.
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:12 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: remove forward declarations in .c file
Checkpatch was giving a "externs should be avoided in .c files" because
of these forward declarations. As these were not useful in this case,
they have been removed.
Clean-up the file by using a cleaner spacing around symbols and
words. Mostly use the automatic checkpatch whitespacing fixes.
This takes care of the consistent spacing errors reported by
checkpatch.
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:06 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error
A missing struct keyword in variable declaration triggered a
need consistent spacing around '*' code style error. The struct
keyword thus has been added everywhere for the rtl8192_rx_info
struct, and therefore its typedef removed as not needed anymore.
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:28 +0000 (20:48 +0530)]
staging: most: fix Makefile
The Makefile is including "drivers/media/video". But there is no such
directory in kernel tree. Since it is aim-v4l2 this might have been
"drivers/media/v4l2-core", but the Kconfig already mentions that it
depends on VIDEO_V4L2. So no need to mention that again in the Makefile.
Johnny Kim [Thu, 20 Aug 2015 07:32:53 +0000 (16:32 +0900)]
staging: wilc1000: change address to fixed value
The linux_wlan_init_test_config() is called once when net driver is loaded.
And because the pointer type of the pstrWFIDrv is changed with the interger
type, this patch replaces it with designated value instead of pointer.
Signed-off-by: Johnny Kim <johnny.kim@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johnny Kim [Thu, 20 Aug 2015 07:32:51 +0000 (16:32 +0900)]
staging: wilc1000: add an argument for Handle_SetWfiDrvHandler
Similar to functions of same layer, this patch add an argument for
Handle_SetWfiDrvHandler function. As a result, the redundant typecasting is
removed.
Signed-off-by: Johnny Kim <johnny.kim@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johnny Kim [Thu, 20 Aug 2015 07:32:50 +0000 (16:32 +0900)]
staging: wilc1000: use the real data type
This patch changes the type of gu8FlushedJoinReqDrvHandler with his real
data type becasue typecasting is not necessary. In result, typecasting
which is not necessary and some building warnings is removed.
Signed-off-by: Johnny Kim <johnny.kim@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Wed, 19 Aug 2015 03:14:50 +0000 (23:14 -0400)]
staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak
The MALLOC_WILC_BUFFER() macro was using a return statement, and didn't
take care of possible memory leaks and subsequent bugs when it was failing
after succeeding some allocations. This patch corrects this behavior.