Tim Sell [Fri, 2 Oct 2015 17:19:19 +0000 (13:19 -0400)]
staging: unisys: visorinput: make structs & arrays const where possible
This also gave me a warning with the assignment:
visorinput_dev->keycode = visorkbd_keycode;
because input_dev->keycode is NOT static but visorkbd_keycode now is, so
I went ahead and also added logic to stash away non-static copies of
visorkbd_keycode[] and visorkbd_ext_keycode[] within visorinput_devdata,
and use the copy to assign to visorinput_dev->keycode. This change is
also technically required, because user-space can remap keys, and we
don't want this to be shared with the other keyboard devices running on
the same system.
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Sell [Fri, 2 Oct 2015 17:19:17 +0000 (13:19 -0400)]
staging: unisys: visorinput: re-order declarations for consistency
In order to be more consistent with kernel conventions used elsewhere,
I have re-ordered declarations in visorinput.c to follow this general
order (where possible):
* #defines
* struct/enum/union declarations
* static declarations (const if possible for all of them)
* forward function declarations where absolutely necessary
Exceptions were made for the static declarations like the driver
declaration, given that it depends on previously-defined callbacks.
So such declarations are at the end of visorinput.c.
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Sell [Fri, 2 Oct 2015 17:19:15 +0000 (13:19 -0400)]
staging: unisys: visorhid: rename to visorinput
This visorhid driver provides a Human Interface Device, but is not at all
using HID, the protocol. It's a plain input driver, so for clarity, it is
being renamed to visorinput.
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 2 Oct 2015 12:44:53 +0000 (21:44 +0900)]
staging: wilc1000: fix return type of host_int_wait_msg_queue_idle
This patch changes return type of host_int_wait_msg_queue_idle from s32
to int. s32Error gets return value from wilc_mq_send that has return
type of int. It should be changed return type of
host_int_wait_msg_queue_idle by int as well as data type of s32Error.
Chaehyun Lim [Fri, 2 Oct 2015 12:44:47 +0000 (21:44 +0900)]
staging: wilc1000: fix return type of host_int_set_mac_chnl_num
This patch changes return type of host_int_set_mac_chnl_num from s32 to
int. s32Error gets return value from wilc_mq_send function that
has return type of int. It should be changed return type of
host_int_set_mac_chnl_num function by int as well as data type of
s32Error.
Shraddha Barke [Sat, 3 Oct 2015 12:01:30 +0000 (17:31 +0530)]
Staging: most: Use module_platform_driver
Use module_platform_driver for drivers whose init and exit functions
only register and unregister, respectively. Thus remove some
boilerplate code.
A simplified version of Coccinelle patch -
@a@
identifier f, x;
@@
-static f(...) { return platform_driver_register(&x); }
@b depends on a@
identifier e, a.x;
@@
-static e(...) { platform_driver_unregister(&x); }
@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);
@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_platform_driver;
@@
-module_exit(e);
+module_platform_driver(x);
Staging: comedi: Use mutex instead of semaphore in ni_usb6501.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Staging: comedi: Use mutex instead of semaphore in usbduxfast.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Staging: comedi: Use mutex instead of semaphore in usbdux.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Staging: comedi: Use mutex instead of semaphore in usbduxsigma.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Struct timespec will overflow in year 2038, here it will not cause an
overflow because it is used with timespec_sub, but still has to be
removed as part of y2038 changes. Replace it with ktime_t. Also use
monotonic instead of real-time by replacing functions getnstimeofday
with ktime_get.
Sudip Mukherjee [Sat, 3 Oct 2015 15:22:49 +0000 (20:52 +0530)]
staging: dgnc: remove dgnc_init_globals function
The dgnc_init_globals() function is only initializing the timer so
initialize it directly and remove dgnc_init_globals() and change the
comment appropriately.
Rocco Folino [Fri, 2 Oct 2015 21:54:26 +0000 (23:54 +0200)]
staging/lustre: Make nrs_policy_get_info_locked() static
This patch fixes the warning generated by sparse: "symbol 'nrs_policy_get_info_locked' was not
declared. Should it be static?" by declaring the function static.
Shraddha Barke [Fri, 2 Oct 2015 17:49:13 +0000 (23:19 +0530)]
Staging: lustre: obdclass: genops: Declare as static
Declare class_get_type and class_search_type as static since they
are used only in this particular file. Also remove the declaration
from header files.
Shraddha Barke [Fri, 2 Oct 2015 17:49:12 +0000 (23:19 +0530)]
Staging: lustre: obdclass: obd_config: Declare as static
Declare class_add_conn, class_add_profile, class_cleanup,
class_config_parse_rec, class_del_conn, class_detach, class_match_param,
class_attach, class_setup as static since they are used only in this
particular file. Also remove the corresponding declarations from
header files.
Shraddha Barke [Fri, 2 Oct 2015 17:49:10 +0000 (23:19 +0530)]
Staging: lustre: obdclass: cl_io: Declare as static
Declare cl_page_list_assume, cl_io_cancel, cl_io_rw_advance,
cl_page_list_del, cl_page_list_discard, cl_page_list_fini as
static since they are used only in this particular file.
Also remove them from corresponding header files
Cristina Moraru [Sat, 3 Oct 2015 15:20:47 +0000 (18:20 +0300)]
staging: android: Remove kernel-doc typo
Fix 'No description found for parameter 'prot_mask'' and 'Excess
struct/union/enum/typedef member 'prot_masks' description in
'ashmem_area'' warnings by removing typo
Ioana Ciornei [Fri, 2 Oct 2015 10:37:50 +0000 (13:37 +0300)]
staging: iio: resolver: replace iio_device_register by devm_iio_device_register
Use devm_iio_device_register instead of iio_device_register when the remove
function is only used to call iio_device_unregister in order to ease the error path.
Since resource managed functions implicitly call unregister at driver detach also remove
iio_device_unregister
Ioana Ciornei [Fri, 2 Oct 2015 10:37:49 +0000 (13:37 +0300)]
staging: iio: light: use devm_iio_device_register instead iio_device_register
Replace iio_device_register with resource managed devm_iio_device_register in order
to ease the error path. Also delete the remove function since there is no need after
this change.
Ioana Ciornei [Fri, 2 Oct 2015 10:37:48 +0000 (13:37 +0300)]
staging: iio: cdc: use devm_iio_device_register instead iio_device_register
Replace iio_device_register with resource managed devm_iio_device_register in order
to ease the error path. Also delete de remove function since there is no need after
this change.
Maciek Borzecki [Sat, 3 Oct 2015 14:01:36 +0000 (16:01 +0200)]
staging: wlan-ng: prism2sta: replace memcmp with ether_addr_equal
Replace memcmp() with ether_addr_equal(). In every location where the
replacement was done, the addresses accessed are
__aligned(2). Structures accessed either stack or heap allocated, no
direct memory casts to possibly unaligned structs are used.
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 [Fri, 2 Oct 2015 05:22:11 +0000 (14:22 +0900)]
staging: wilc1000: remove function pointer cfg_init
This patch removes function pointer cfg_init and call the function
wilc_wlan_cfg_init instead. Remove static from function declaration.
After removing cfg_init, the struct wilc_cfg_func_t is useless so just delete
it and it's related codes.
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 [Fri, 2 Oct 2015 05:22:10 +0000 (14:22 +0900)]
staging: wilc1000: remove function pointer rx_indicate
This patch removes function pointer rx_indicate and just call the function
wilc_wlan_cfg_indicate_rx instead. Remove static from the function
declration.
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 [Fri, 2 Oct 2015 05:22:09 +0000 (14:22 +0900)]
staging: wilc1000: remove function pointer cfg_wid_get_val
This patch removes cfg_wid_get_val and call the function
wilc_wlan_cfg_get_wid_value. Remove static from the function declaration.
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 [Fri, 2 Oct 2015 05:22:08 +0000 (14:22 +0900)]
staging: wilc1000: remove function pointer cfg_wid_get
Remove function pointer cfg_wid_get and call the function
wilc_wlan_cfg_get_wid instead. Remove static from the function declaration.
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 [Fri, 2 Oct 2015 05:22:07 +0000 (14:22 +0900)]
staging: wilc1000: remove function pointer cfg_wid_set
This patch removes function pointer cfg_wid_set and call the function
wilc_wlan_cfg_set_wid instead. Remove static from the function declaration.
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 [Fri, 2 Oct 2015 05:22:06 +0000 (14:22 +0900)]
staging: wilc1000: Delete undefined DEBUG_MODE and it's related codes
This patch removes undefined DEBUG_MODE and it's related codes.
We won't use this at the moment.
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>
This patch removes unused variable already_claim and hWILCWFIDrv_2.
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>
Tony Cho [Fri, 2 Oct 2015 05:22:03 +0000 (14:22 +0900)]
staging: wilc1000: remove typedef from enum
This patch removes typedef from enumerated types defined in
coreconfigurator.c file and also changes their names to avoid CamelCase
naming convention as shown:
- tenuBasicFrmType to basic_frame_type
- tenuFrmSubtype to sub_frame_type
- tenuInfoElemID to info_element_id
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 1 Oct 2015 07:03:43 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_add_mgmt_to_tx_que
This patch removes function pointer wlan_add_mgmt_to_tx_que and just call
the function wilc_wlan_txq_add_mgmt_pkt.
Remove structure wilc_wlan_oup_t also because no members in it. Since
wilc_wlan_oup_t is deleted, it's variable, function parameters and related
codes are also deleted.
- deleted variables
gpstrWlanOps
oup
- modified functions
wilc1000_prepare_11b_core
wilc_wlan_init
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 [Thu, 1 Oct 2015 07:03:42 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_cfg_get_value
This patch removes function pointer wlan_cfg_get_value and just call
the function wilc_wlan_cfg_get_val. Remove static from the function also.
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 [Thu, 1 Oct 2015 07:03:41 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_cfg_get
This patch removes function pointer wlan_cfg_get and just call
the function wilc_wlan_cfg_get. Remove static from the function also.
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 [Thu, 1 Oct 2015 07:03:40 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_cfg_set
This patch removes function pointer wlan_cfg_set and just call
the function wilc_wlan_cfg_set. Remove static from the function also.
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 [Thu, 1 Oct 2015 07:03:39 +0000 (16:03 +0900)]
staging: wilc1000: delete define ACTION and PROBE_REQ
The define ACTION and PROBE_REQ are duplicate. They are aleady defined in
host_interface.h. Just delete 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 [Thu, 1 Oct 2015 07:03:38 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_cleanup
This patch removes function pointer wlan_cleanup and just call the function
wilc_wlan_cleanup. Remove static from the function also.
After changing function pointer wlan_cleanup with wilc_wlan_cleanup,
the define wilc_wlan_deinit will be like folowing.
The define is unnecessary so just call wilc_wlan_cleanup instead of
wilc_wlan_deinit() and remove the define also.
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 [Thu, 1 Oct 2015 07:03:37 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_handle_rx_isr
This patch removes function pointer wlan_handle_rx_isr and just call
the function wilc_handle_isr.
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 [Thu, 1 Oct 2015 07:03:36 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_handle_tx_que
This patch removes function pointer wlan_handle_tx_que and just call
the function wilc_wlan_handle_txq. Remove static from the function also.
There is one function call wlan_handle_tx_que which does not have an argument
and return value. So put txq_count as argument and ret for return value.
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 [Thu, 1 Oct 2015 07:03:35 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_add_to_tx_que
This patch removes function pointer wlan_add_to_tx_que and just call
the function wilc_wlan_txq_add_net_pkt. Remove static from the function also.
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 [Thu, 1 Oct 2015 07:03:34 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_stop
This patch removes function pointer wlan_stop and just call
the function wilc_wlan_stop. Remove static from the function also.
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 [Thu, 1 Oct 2015 07:03:33 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_start
This patch removes function pointer wlan_start and just call
the function wilc_wlan_start. Remove static from the function also.
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 [Thu, 1 Oct 2015 07:03:32 +0000 (16:03 +0900)]
staging: wilc1000: remove function pointer wlan_firmware_download
This patch removes function pointer wlan_firmware_download and just call
the function wilc_wlan_firmware_download. Remove static from the function also.
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>
Tony Cho [Wed, 30 Sep 2015 09:44:29 +0000 (18:44 +0900)]
staging: wilc1000: remove struct del_beacon
This patch removes struct del_beacon which is not necessary. This patch
also changes Handle_DelBeacon function by removing 2nd parameter, struct
del_beacon because it is not used inside.
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>