sfrench/cifs-2.6.git
5 years agostaging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:50 +0000 (19:34 +0100)]
staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c

Add spaces around '&' to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: change return type of is_basicrate() to bool
Michael Straube [Tue, 18 Dec 2018 18:34:49 +0000 (19:34 +0100)]
staging: rtl8188eu: change return type of is_basicrate() to bool

The function is_basicrate() returns true or false, so change the
return type from int to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: simplify null array initializations
Michael Straube [Tue, 18 Dec 2018 18:34:48 +0000 (19:34 +0100)]
staging: rtl8188eu: simplify null array initializations

Simplfy initialization of null arrays to improve readability
and save some lines.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: change order of declarations to improve readability
Michael Straube [Tue, 18 Dec 2018 18:34:47 +0000 (19:34 +0100)]
staging: rtl8188eu: change order of declarations to improve readability

Change the order of array declarations in rtw_mlme_ext.c to improve
readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: make some arrays static in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:46 +0000 (19:34 +0100)]
staging: rtl8188eu: make some arrays static in rtw_mlme_ext.c

Make some arrays that are only used in rtw_mlme_ext.c static and
remove the corresponding extern declarations from rtw_mlme_ext.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: constify some arrays
Michael Straube [Tue, 18 Dec 2018 18:34:45 +0000 (19:34 +0100)]
staging: rtl8188eu: constify some arrays

The values of these arrays in rtw_mlme_ext.c and rtw_wlan_util.c
are never changed, so make them const.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: convert unsigned char arrays to u8
Michael Straube [Tue, 18 Dec 2018 18:34:44 +0000 (19:34 +0100)]
staging: rtl8188eu: convert unsigned char arrays to u8

Change the type of some arrays from unsigned char to u8.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:43 +0000 (19:34 +0100)]
staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c

The array REALTEK_96B_IE is already declared in rtw_mlme.h,
so remove the declaration in rtw_mlme_ext.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI
Michael Straube [Tue, 18 Dec 2018 18:34:42 +0000 (19:34 +0100)]
staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI

The arrays WFD_OUI and WMM_INFO_OUI are not used anywhere,
so remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:41 +0000 (19:34 +0100)]
staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.c

Remove unnecessary parentheses, most of them reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:40 +0000 (19:34 +0100)]
staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c

Remove comments from 'endif's where the corresponding 'if' is just
a few lines above to improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add blank line after declarations
Michael Straube [Tue, 18 Dec 2018 18:34:39 +0000 (19:34 +0100)]
staging: rtl8188eu: add blank line after declarations

Add a missing blank line after declarations in rtw_mlme_ext.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove blank lines between declarations
Michael Straube [Tue, 18 Dec 2018 18:34:38 +0000 (19:34 +0100)]
staging: rtl8188eu: remove blank lines between declarations

Remove blank lines between declarations in rtw_mlme_ext.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove commented declarations in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:37 +0000 (19:34 +0100)]
staging: rtl8188eu: remove commented declarations in rtw_mlme_ext.c

Remove unused/commented declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: replace tabs with spaces in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:36 +0000 (19:34 +0100)]
staging: rtl8188eu: replace tabs with spaces in rtw_mlme_ext.c

Replace tabs with spaces where appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c
Michael Straube [Tue, 18 Dec 2018 18:34:35 +0000 (19:34 +0100)]
staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c

Replace tabs with spaces and/or remove spaces in declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fbtft: fix strncmp() size warning
YueHaibing [Tue, 18 Dec 2018 14:28:21 +0000 (22:28 +0800)]
staging: fbtft: fix strncmp() size warning

strncmp() stops comparing when either the end of one of the first two
arguments is reached or when 'n' characters have been compared, whichever
comes first.That means that strncmp(s1, s2, n) is equivalent to
strcmp(s1, s2) if n exceeds the length of s1 or the length of s2.

This patch avoids that the following warning is reported by smatch:

drivers/staging/fbtft/fbtft_device.c:1458
 fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32)

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: sound: replace snprintf with strscpy
Colin Ian King [Tue, 18 Dec 2018 11:35:52 +0000 (11:35 +0000)]
staging: most: sound: replace snprintf with strscpy

Using snprintf without a format specifier is potentially risky if
the string device_name contains format specifiers. Replace this with
the safer and more efficient strscpy.

Cleans up clang warning:
drivers/staging/most/sound/sound.c:673:41: warning: format string is not
a string literal (potentially insecure) [-Wformat-security]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: Documentation: add information to driver_usage file
Christian Gromm [Mon, 17 Dec 2018 14:10:17 +0000 (15:10 +0100)]
staging: most: Documentation: add information to driver_usage file

This patch updates driver_usage.txt file to reflect the latest changes
that this patch set introduces.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: sound: remove channel number from ALSA card's long name
Christian Gromm [Mon, 17 Dec 2018 14:10:16 +0000 (15:10 +0100)]
staging: most: sound: remove channel number from ALSA card's long name

Adding the channel number to the name of the sound card is wrong,
as the card does not represent a single streaming channel of the
MOST device.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: sound: use static name for ALSA card
Christian Gromm [Mon, 17 Dec 2018 14:10:15 +0000 (15:10 +0100)]
staging: most: sound: use static name for ALSA card

This patch uses a static name for the sound card's short name and
long name. Having the card names configurable doesn't make sense
anymore, as the card represents the same physical hardware.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: sound: rename variable
Christian Gromm [Mon, 17 Dec 2018 14:10:14 +0000 (15:10 +0100)]
staging: most: sound: rename variable

Since the channels of a MOST device are now being represented as
individual PCM devices of one sound card, the variable card_name is not
suitable anymore to describe them. Therefore, this patch renames the
variable to device_name.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: sound: correct label name
Christian Gromm [Mon, 17 Dec 2018 14:10:13 +0000 (15:10 +0100)]
staging: most: sound: correct label name

This patch fixes the lable name that is used to jump to error
handling section of function audio_probe_channel() in case
something went wrong.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: sound: create one sound card w/ multiple PCM devices per MOST device
Christian Gromm [Mon, 17 Dec 2018 14:10:12 +0000 (15:10 +0100)]
staging: most: sound: create one sound card w/ multiple PCM devices per MOST device

This patch avoids that a sound card is created and registered with ALSA
every time a channel is being linked. Instead the channels are hooked on
the same card, which is registered not until the final link has been added
to the component. The string provided by user space that used to be the
card name becomes the PCM device name. The user space API to add a link is
being expanded by a "create" flag to trigger the registration.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIU_QUEUE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:10 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIU_QUEUE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_STATE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:09 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_STATE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SLOT_ZERO_T
Dominic Braun [Fri, 14 Dec 2018 12:05:08 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SLOT_ZERO_T

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SLOT_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:07 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SLOT_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SLOT_INFO_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:06 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SLOT_INFO_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SHARED_STATE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:05 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SHARED_STATE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SET_SERVICE_OPTION_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:04 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SET_SERVICE_OPTION_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SERVICE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:03 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SERVICE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SERVICE_QUOTA_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:02 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SERVICE_QUOTA_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SERVICE_PARAMS_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:01 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SERVICE_PARAMS_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_SERVICE_BASE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:05:00 +0000 (13:05 +0100)]
staging: vc04_services: Remove VCHIQ_SERVICE_BASE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_QUEUE_MESSAGE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:59 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_QUEUE_MESSAGE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_QUEUE_BULK_TRANSFER_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:58 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_QUEUE_BULK_TRANSFER_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_HEADER_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:57 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_HEADER_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_GET_CONFIG_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:56 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_GET_CONFIG_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_DUMP_MEM_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:55 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_DUMP_MEM_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_DEQUEUE_MESSAGE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:54 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_DEQUEUE_MESSAGE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_DEBUGFS_NODE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:53 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_DEBUGFS_NODE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_CREATE_SERVICE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:52 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_CREATE_SERVICE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_CONFIG_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:51 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_CONFIG_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_COMPLETION_DATA_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:50 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_COMPLETION_DATA_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_BULK_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:49 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_BULK_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_BULK_QUEUE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:48 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_BULK_QUEUE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_AWAIT_COMPLETION_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:47 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_AWAIT_COMPLETION_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHIQ_ARM_STATE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:46 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHIQ_ARM_STATE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHI_MSG_VECTOR_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:45 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHI_MSG_VECTOR_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHI_MSG_ITER_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:44 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHI_MSG_ITER_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove VCHI_HELD_MSG_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:43 +0000 (13:04 +0100)]
staging: vc04_services: Remove VCHI_HELD_MSG_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove USER_SERVICE_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:42 +0000 (13:04 +0100)]
staging: vc04_services: Remove USER_SERVICE_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove SERVICE_CREATION_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:41 +0000 (13:04 +0100)]
staging: vc04_services: Remove SERVICE_CREATION_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove REMOTE_EVENT_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:40 +0000 (13:04 +0100)]
staging: vc04_services: Remove REMOTE_EVENT_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove PAGELIST_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:39 +0000 (13:04 +0100)]
staging: vc04_services: Remove PAGELIST_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Remove DUMP_CONTEXT_T typedef
Dominic Braun [Fri, 14 Dec 2018 12:04:38 +0000 (13:04 +0100)]
staging: vc04_services: Remove DUMP_CONTEXT_T typedef

Typedefing structs is not encouraged in the kernel.

Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: rtl8723bs: Fix code style issue in rtl8723bs driver
Hardik Singh Rathore [Wed, 12 Dec 2018 13:54:55 +0000 (19:24 +0530)]
Staging: rtl8723bs: Fix code style issue in rtl8723bs driver

Add space between 'else' and '{' to solve code style issue
in all the files for rtl8723bs driver.

Signed-off-by: Hardik Singh Rathore <hardiksingh.k@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: greybus: convert to DEFINE_SHOW_ATTRIBUTE
Yangtao Li [Sat, 15 Dec 2018 08:53:12 +0000 (03:53 -0500)]
staging: greybus: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: convert to DEFINE_SHOW_ATTRIBUTE
Yangtao Li [Sat, 15 Dec 2018 09:01:13 +0000 (04:01 -0500)]
staging: vc04_services: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: unisys: convert to DEFINE_SHOW_ATTRIBUTE
Yangtao Li [Sat, 15 Dec 2018 08:59:12 +0000 (03:59 -0500)]
staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fwserial: convert to DEFINE_SHOW_ATTRIBUTE
Yangtao Li [Sat, 15 Dec 2018 08:51:07 +0000 (03:51 -0500)]
staging: fwserial: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: fix NULL dereference inside wilc_scan()
Ajay Singh [Sat, 15 Dec 2018 02:32:29 +0000 (02:32 +0000)]
staging: wilc1000: fix NULL dereference inside wilc_scan()

Added NULL check before accessing 'hidden_net' pointer inside
wilc_scan() to fix the issue found by static code checker.

Fixes: 8f1a0ac1eba7 ("staging: wilc1000: handle scan operation callback from cfg80211 context")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vchiq: delete vchiq_killable.h
Nicolas Saenz Julienne [Wed, 12 Dec 2018 18:51:35 +0000 (19:51 +0100)]
staging: vchiq: delete vchiq_killable.h

There are no users for that header file.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vchiq_2835_arm: quit using custom down_interruptible()
Nicolas Saenz Julienne [Wed, 12 Dec 2018 18:51:34 +0000 (19:51 +0100)]
staging: vchiq_2835_arm: quit using custom down_interruptible()

vchi_killable.h overrides down_interruptible() by implementing a
function similar to down_killable(). To make things simpler we turn
calls to down_interruptible() into kernel's implementation of
down_killable().

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vchiq: switch to wait_for_completion_killable
Nicolas Saenz Julienne [Wed, 12 Dec 2018 18:51:33 +0000 (19:51 +0100)]
staging: vchiq: switch to wait_for_completion_killable

This fixes f27e47bc6b8b ("staging: vchiq: use completions instead of
semaphores") as it neglected the subtle down_interruptible() macro
override in vchiq_killable.h. Hence all completions should be killable
instead of interruptible.

Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-audio: double free in init error path
Dan Carpenter [Mon, 17 Dec 2018 07:08:54 +0000 (10:08 +0300)]
staging: bcm2835-audio: double free in init error path

We free instance here and in the caller.  It should be only the caller
which handles it.

Fixes: d7ca3a71545b ("staging: bcm2835-audio: Operate non-atomic PCM ops")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-dma: fix unbalanced braces
Lou Knauer [Thu, 13 Dec 2018 09:43:17 +0000 (10:43 +0100)]
staging: mt7621-dma: fix unbalanced braces

Add braces to conditional statements if the other branch has them in
order to be more compliant with the linux kernel coding style.

Remaining checkpatch.pl issues include unnecessary line continuations
and use of non-conventional types.

Signed-off-by: Lou Knauer <lou.knauer@fau.de>
Signed-off-by: Philipp Panzer <philipp.panzer@fau.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: comedi: cb_pcidas: fixed a spelling mistake coding style issue
Amir Mahdi Ghorbanian [Thu, 13 Dec 2018 18:26:24 +0000 (10:26 -0800)]
Staging: comedi: cb_pcidas: fixed a spelling mistake coding style issue

Fixed a coding style issue.

Signed-off-by: Amir Mahdi Ghorbanian <indigoomega021@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMerge tag 'iio-for-4.21b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Thu, 13 Dec 2018 12:37:24 +0000 (13:37 +0100)]
Merge tag 'iio-for-4.21b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of IIO new device support, features and cleanups for the 4.21 cycle.

Staging graduation
* ad2s90
  - Driver for this resolver to digital chip.

New drivers and device support.
* ad5686
  - Add support for ad5310r DAC and associated fix in value read back.
* exynos-adc
  - Support for S5PV210 which is slightly different from other parts.
* mcp41010
  - Driver supporting MCP41010, MCP41050, MCP41100, MCP42010, MCP42050 and
  MCP42100 microchip potentiometers.

New ACPI ids.
* ak8975
  - AKM9911 ACPI HID.
* kxcjk-1013
  - KXJ2109 ACPI HID.
  - KIOX010A ACPI HID.

New features
* ad5933
  - Explicit DT binding.
* ad2s90
  - Explicit DT binding including dropping spi setup that is done via dt
    in favour of verifying the settings form DT.
* adt7316
  - Explicit DT binding and support for gpio, irq_flags etc.
* stm32-adc
  - Runtime power management.

Minor fixes and cleanups
* core
  - Protect against missing info structure.
* ad2s90
  - SPDX
  - Add documentation fo the mutex.
ad7280a
  - Check allocation failure.
  - Fix an accidental replacement of an error return.
* adt7316
  - Switch some variables to be local and rename for consistency with other
    drivers.
  - Revert a false handling of 0 as an error introduced earlier this cycle.
* bmi160
  - Use devm functions throughout probe() to avoid need for remove().
* hid-sensor-hub
  - White space cleanup.
* hts221
  - MAINTAINERS entry.
* lis302
  - Use generic name in the DT binding doc.
* Messon-saradc
  - Check for allocation error.
  - Fix some presented clock names that break clk debugfs.
* qcom-spmi-adc
  - A fix for initialization of the prescale property. Came late in the
    cycle, so merge window is probably the best route for this.
* st_lsm6dsx
  - Allow for variable read length to support wider range of slave devices.

* tag 'iio-for-4.21b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (37 commits)
  iio: adc: qcom-spmi-adc5: Initialize prescale properly
  dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant
  iio: adc: Allow selection of Exynos ADC on S5PV210
  iio: adc: exynos-adc: Add S5PV210 variant
  iio: bmi160: use all devm functions in probe
  iio: dac: ad5686: fix bit shift read register
  iio:dac:ad5686: Add AD5310R support
  Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"
  dt-bindings: iio: accel: use a generic node name for lis302
  iio: core: check 'info' value before registering the device
  staging: iio: adc: ad7280a: fix overwrite of the returned value
  staging: iio: adc: ad7280a: check for devm_kasprint() failure
  iio: humidity: hts221: add entry in MAINTAINERS file
  iio: magnetometer: ak8975: Add the "AKM9911" ACPI HID
  staging:iio:ad2s90: Move out of staging
  staging:iio:ad2s90: Add comment to device state mutex
  staging:iio:ad2s90: Replace license text w/ SPDX identifier
  dt-bindings:iio:resolver: Add docs for ad2s90
  staging:iio:ad2s90: Add max frequency check at probe
  staging:iio:ad2s90: Remove spi setup that should be done via dt
  ...

5 years agoiio: adc: qcom-spmi-adc5: Initialize prescale properly
Evan Green [Tue, 4 Dec 2018 19:14:19 +0000 (11:14 -0800)]
iio: adc: qcom-spmi-adc5: Initialize prescale properly

adc5_get_dt_data uses a local, prop, feeds it to adc5_get_dt_channel_data,
and then puts the result into adc->chan_props. The problem is
adc5_get_dt_channel_data may not initialize that structure fully, so a
garbage value is used for prescale if the optional "qcom,pre-scaling" is
not defined in DT. adc5_read_raw then uses this as an array index,
generating a crash that looks like this:

[    6.683186] Unable to handle kernel paging request at virtual address ffffff90e78c7964
Call trace:
qcom_vadc_scale_code_voltage_factor+0x74/0x104
qcom_vadc_scale_hw_calib_die_temp+0x20/0x60
qcom_adc5_hw_scale+0x78/0xa4
adc5_read_raw+0x3d0/0x65c
iio_channel_read+0x240/0x30c
iio_read_channel_processed+0x10c/0x150
qpnp_tm_get_temp+0xc0/0x40c
of_thermal_get_temp+0x7c/0x98
thermal_zone_get_temp+0xac/0xd8
thermal_zone_device_update+0xc0/0x38c
qpnp_tm_probe+0x624/0x81c
platform_drv_probe+0xe4/0x11c
really_probe+0x188/0x3fc
driver_probe_device+0xb8/0x188
__device_attach_driver+0x114/0x180
bus_for_each_drv+0xd8/0x118
__device_attach+0x180/0x27c
device_initial_probe+0x20/0x2c
bus_probe_device+0x78/0x124
deferred_probe_work_func+0xfc/0x138
process_one_work+0x3d8/0x8b0
process_scheduled_works+0x48/0x6c
worker_thread+0x488/0x7cc
kthread+0x24c/0x264
ret_from_fork+0x10/0x18

Unfortunately, when I went to add the initializer for this and tried to
boot it, my machine shut down immediately, complaining that it was
hotter than the sun. It appears that adc5_chans_pmic and adc5_chans_rev2
were initializing prescale_index as if it were directly a divisor,
rather than the index into adc5_prescale_ratios that it is.

Fix the uninitialized value, and change the static initialization to use
indices into adc5_prescale_ratios.

Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agodt-bindings: iio: adc: exynos-adc: Add S5PV210 variant
Jonathan Bakker [Fri, 7 Dec 2018 19:11:36 +0000 (20:11 +0100)]
dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant

Add information about new compatible for S5PV210

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: Allow selection of Exynos ADC on S5PV210
Jonathan Bakker [Fri, 7 Dec 2018 19:11:35 +0000 (20:11 +0100)]
iio: adc: Allow selection of Exynos ADC on S5PV210

Make it possible to use Exynos ADC driver on S5PV210 based devices.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: exynos-adc: Add S5PV210 variant
Jonathan Bakker [Fri, 7 Dec 2018 19:11:34 +0000 (20:11 +0100)]
iio: adc: exynos-adc: Add S5PV210 variant

S5PV210's ADC variant is almost the same as v1 except that it has 10
channels and doesn't require the pmu register

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: mt7621-mmc: Fix incompletely removed #if 0 block in sd.c
Nishad Kamdar [Thu, 6 Dec 2018 15:57:06 +0000 (21:27 +0530)]
staging: mt7621-mmc: Fix incompletely removed #if 0 block in sd.c

Commit 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c")
does not completely remove an #if 0 block in sd.c. This causes the function
msdc_select_clksrc() which was eariler not compiled, to be compiled.
That causes an error - MSDC_CLKSRC_REG is not defined.

This patch completely removes the #if 0 block

Reported-by: NeilBrown <neil@brown.name>
Fixes: 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c")
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Add hint about possible faulty config
Stefan Wahren [Thu, 6 Dec 2018 18:29:00 +0000 (19:29 +0100)]
staging: bcm2835-camera: Add hint about possible faulty config

As per default the GPU memory config of the Raspberry Pi isn't sufficient
for the camera usage. Even worse the bcm2835 camera driver doesn't provide a
helpful error message in this case. So let's add a hint to point the user
to the likely cause.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Provide more specific probe error messages
Stefan Wahren [Thu, 6 Dec 2018 18:28:59 +0000 (19:28 +0100)]
staging: bcm2835-camera: Provide more specific probe error messages

Currently there is only a catch-all info message which print the
relevant error code without any context. So add more specific error
messages in order to narrow down possible issues.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-audio: Drop DT dependency
Stefan Wahren [Thu, 6 Dec 2018 18:28:58 +0000 (19:28 +0100)]
staging: bcm2835-audio: Drop DT dependency

Just like the bcm2835-video make this a platform driver which is probed
by vchiq. In order to change the number of channels use a module
parameter instead, but use the maximum as default.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-audio: use module_platform_driver() macro
Stefan Wahren [Thu, 6 Dec 2018 18:28:57 +0000 (19:28 +0100)]
staging: bcm2835-audio: use module_platform_driver() macro

There is not much value behind this boilerplate, so use
module_platform_driver() instead.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-audio: Enable compile test
Stefan Wahren [Thu, 6 Dec 2018 18:28:56 +0000 (19:28 +0100)]
staging: bcm2835-audio: Enable compile test

Enable the compilation test for bcm2835-audio to gain more build coverage.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vchiq_arm: Register a platform device for audio
Stefan Wahren [Thu, 6 Dec 2018 18:28:55 +0000 (19:28 +0100)]
staging: vchiq_arm: Register a platform device for audio

Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a
platform device for the camera driver.") this register the audio driver as
a platform device, too.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vchiq_arm: Fix camera device registration
Stefan Wahren [Thu, 6 Dec 2018 18:28:54 +0000 (19:28 +0100)]
staging: vchiq_arm: Fix camera device registration

Since the camera driver isn't probed via DT, we need to properly setup DMA.

Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Move module info to the end
Stefan Wahren [Thu, 6 Dec 2018 18:28:53 +0000 (19:28 +0100)]
staging: bcm2835-camera: Move module info to the end

In order to have this more consistent between the vc04 services move
the module information to the end of the file.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: fix module autoloading
Stefan Wahren [Thu, 6 Dec 2018 18:28:52 +0000 (19:28 +0100)]
staging: bcm2835-camera: fix module autoloading

In order to make the module bcm2835-camera load automatically, we need to
add a module alias.

Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Abort probe if there is no camera
Stefan Wahren [Thu, 6 Dec 2018 18:28:51 +0000 (19:28 +0100)]
staging: bcm2835-camera: Abort probe if there is no camera

Abort the probing of the camera driver in case there isn't a camera
actually connected to the Raspberry Pi. This solution also avoids a
NULL ptr dereference of mmal instance on driver unload.

Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-dts: avoid warnings in pinctrl definitions
NeilBrown [Sun, 9 Dec 2018 05:20:33 +0000 (16:20 +1100)]
staging: mt7621-dts: avoid warnings in pinctrl definitions

The device-tree checking code sees node names  "i2c" and "spi" in the
pinctrl definition and thinks these are defining i2c or spi devices,
and complains that they look wrong.

So add a '0' to the end of each name (much like "uart" and "rgmii"
have numbers at the end) to avoid the warning.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: fix compile warnging: cmd_buf
NeilBrown [Sun, 9 Dec 2018 05:20:33 +0000 (16:20 +1100)]
staging: mt7621-mmc: fix compile warnging: cmd_buf

cmd_buf is only used when MT6575_SD_DEBUG is defined.
So only declare it in that case.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: add missing header.
NeilBrown [Sun, 9 Dec 2018 05:20:33 +0000 (16:20 +1100)]
staging: mt7621-mmc: add missing header.

<linux/interrupt.h> is sometimes included by other include files,
and sometimes not, depending on config, particularly CONFIG_HIGHMEM.

So include it explicitly rather than relying on implicit inclusion.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-eth: fix compile warning.
NeilBrown [Sun, 9 Dec 2018 05:20:32 +0000 (16:20 +1100)]
staging: mt7621-eth: fix compile warning.

This code generates a waring as PHY_GBIT_FEATURES is "long" but
->supported in "int".

It looks likely that "PHY_1000BT_FEATURES" is the correct define to
use - it is intended to be used with the ->features field.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-dts: allow gnubee to reboot cleanly.
NeilBrown [Sun, 9 Dec 2018 05:20:32 +0000 (16:20 +1100)]
staging: mt7621-dts: allow gnubee to reboot cleanly.

Since commit bb276262e88d ("mtd: spi-nor: only apply reset hacks to
broken hardware"), we need to mark the spi-nor as "broken" for reboot
to work.
Note that nothing is actually broken here.  The hardware-watchdog in
the SoC isn't wired in a way that works, but then the board doesn't
claim to support a hardware watchdog - and the SPI certain isn't
"broken".

This causes an annoying warning on every boot, but that is better than
failing on ever reboot.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: set correct dma mask.
NeilBrown [Sun, 9 Dec 2018 05:20:32 +0000 (16:20 +1100)]
staging: mt7621-mmc: set correct dma mask.

Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for
simple noncoherent platforms") changed MIPS dma handling, the mmc
driver fails because it doesn't have a dma mask is set.

So set the correct dma mask.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-eth: set correct dma mask.
NeilBrown [Sun, 9 Dec 2018 05:20:32 +0000 (16:20 +1100)]
staging: mt7621-eth: set correct dma mask.

Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for
simple noncoherent platforms") changed MIPS dma handling, the eth
driver fails because the dma mask is set on the wrong 'struct device'.

Move the setting to the correct struct device.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vchiq: rework remove_event handling
Arnd Bergmann [Mon, 10 Dec 2018 21:11:58 +0000 (22:11 +0100)]
staging: vchiq: rework remove_event handling

I had started the removal of semaphores in this driver without knowing
that Nicolas Saenz Julienne also worked on this. In case of the "remote
event" infrastructure, my solution seemed significantly better, so I'm
proposing this as a change on top.

The problem with using either semaphores or completions here is that
it's an overly complex way of waking up a thread, and it looks like the
'count' of the semaphore can easily get out of sync, even though I found
it hard to come up with a specific example.

Changing it to a 'wait_queue_head_t' instead of a completion simplifies
this by letting us wait directly on the 'event->fired' variable that is
set by the videocore.

Another simplification is passing the wait queue directly into the helper
functions instead of going through the fragile logic of recording the
offset inside of a structure as part of a shared memory variable. This
also avoids one uncached memory read and should be faster.

Note that I'm changing it back to 'killable' after the previous patch
changed 'killable' to 'interruptible', apparently based on a misunderstanding
of the subtle down_interruptible() macro override in vchiq_killable.h.

Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: remove semaphore remnants
Arnd Bergmann [Mon, 10 Dec 2018 21:40:32 +0000 (22:40 +0100)]
staging: rtl8723bs: remove semaphore remnants

Nothing uses the semaphores any more in this driver, so remove
all references to that type.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: change pwrctrl lock to a mutex
Arnd Bergmann [Mon, 10 Dec 2018 21:40:31 +0000 (22:40 +0100)]
staging: rtl8723bs: change pwrctrl lock to a mutex

This semaphore is used like a mutex, so it should use the regular
mutex API, as we do in the other copies of this driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: change semaphores to completions
Arnd Bergmann [Mon, 10 Dec 2018 21:40:30 +0000 (22:40 +0100)]
staging: rtl8723bs: change semaphores to completions

This driver uses many semaphores, most of them are equivalent to
completions. The other copies of this driver got moved over to
completions a while ago, so do the same here.

In this usage scenario, the two are equivalent, so the behavior
should not change.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: fix typo in the TODO file
Michael Straube [Mon, 10 Dec 2018 09:52:02 +0000 (10:52 +0100)]
staging: rtl8723bs: fix typo in the TODO file

HGz -> GHz

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: remove dead code, rtw_port_switch_chk()
Michael Straube [Mon, 10 Dec 2018 09:52:01 +0000 (10:52 +0100)]
staging: rtl8723bs: remove dead code, rtw_port_switch_chk()

The function rtw_port_switch_chk() returns always false.
Remove the function and related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: reuse Hal_GetChnlGroup88E()
Michael Straube [Fri, 7 Dec 2018 20:55:15 +0000 (21:55 +0100)]
staging: rtl8188eu: reuse Hal_GetChnlGroup88E()

Use Hal_GetChnlGroup88E() instead of duplicating it's code
in get_rx_power_val_by_reg().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate()
Michael Straube [Fri, 7 Dec 2018 20:55:14 +0000 (21:55 +0100)]
staging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate()

Zeroing the array result[m][n] and setting only the values at
even 'n's simplifies the code and slightly reduces object file
size.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>