Commit graph

49 commits

Author SHA1 Message Date
Greg Kroah-Hartman
dd41dab5d5 staging: vt6656: Remove redundant license text
Now that the SPDX tag is in all vt6656 files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 13:20:47 +01:00
Greg Kroah-Hartman
6b4c6ce892 staging: vt6656: add SPDX identifiers to all vt6656 driver files
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the vt6656 driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 13:20:47 +01:00
Simon Sandström
f21997572c staging: vt6656: Add spaces between operators
Fixes checkpatch.pl warnings "spaces preferred around that <operator>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16 08:41:02 +02:00
Arushi Singhal
8129306658 staging: vt6656: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis"

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16 10:23:09 -08:00
Othmar Pasteka
a85994d546 staging: vt6656: remove address from GPL text
Cleanup errors from checkpatch.pl.

Signed-off-by: Othmar Pasteka <pasteka@kabsi.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-19 16:53:09 -08:00
Christian Engelmayer
d34add0594 staging: vt6656: Fix possible leak in vnt_download_firmware()
When failing to allocate buffer memory, function vnt_download_firmware() goes
through the wrong exit path and fails to release the already requested
firmware. Thus use the correct cleanup. Detected by Coverity CID 1269128.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:26:58 -08:00
Tapasweni Pathak
f0cffbfe8c staging: vt6656: Merge three lines into one
This patch merges three lines into one, removing if branch

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:22:21 -04:00
Tapasweni Pathak
3e46587ef1 staging: vt6656: remove unnecessary else after return
This patch fixes checkpatch.pl warning in files of vt6656
WARNING: else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:41:15 -07:00
Malcolm Priestley
8a73f9da48 staging: vt6656: struct vnt_private rename wFirmwareVersion to firmware_version
Removing camel case

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:11:56 -07:00
Malcolm Priestley
45d63f891c staging: vt6656: rename FIRMWAREbCheckVersion to vnt_check_firmware_version
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -07:00
Malcolm Priestley
1432146125 staging: vt6656: rename FIRMWAREbBrach2Sram to vnt_firmware_branch_to_sram
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -07:00
Malcolm Priestley
6a86b77820 staging: vt6656: rename FIRMWAREbDownload to vnt_download_firmware
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -07:00
Malcolm Priestley
9197f35ba2 staging: vt6656: firmware.c replace DBG_PRT debug messages
Replace with dev_dbg

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -07:00
Malcolm Priestley
0fe8b957a2 staging: vt6656: FIRMWAREbCheckVersion remove camel case
camel case changes
pDevice -> priv
ntStatus -> status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -07:00
Malcolm Priestley
e21a53c3a4 staging: vt6656: FIRMWAREbBrach2Sram remove camel case
camel case changes
pDevice -> priv
NdisStatus -> status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -07:00
Malcolm Priestley
da47d98f1e staging: vt6656: FIRMWAREbDownload remove camel case
camel case changes
pDevice -> priv
NdisStatus -> status
pBuffer -> buffer
wLength -> length

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -07:00
Malcolm Priestley
62c8526d60 staging: vt6656: dead code remove control.c/h
Replace control.h headers with usbpipe.h

Also add to usbpipe.c its header

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:36:50 -07:00
Malcolm Priestley
441c21c3f0 staging: vt6656: rename PIPEnsControlIn/CONTROLnsRequestIn with vnt_control_in
Replace all to CONTROLnsRequestIn with vnt_control_in and remove macro.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:36:49 -07:00
Malcolm Priestley
1390b02a2f staging: vt6656: rename PIPEnsControlOut/CONTROLnsRequestOut to vnt_control_out
Rename all CONTROLnsRequestOut and remove macro from control.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:36:49 -07:00
Malcolm Priestley
60f8ce8dd6 staging: vt6656: rndis.h move all to device.h
Commands macros are common to all source files.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:30 -07:00
Malcolm Priestley
3136b5fee2 staging: vt6656: Remove PIPEnsControlOutAsyn/CONTROLnsRequestOutAsyn
This now the same as PIPEnsControlOut.

Replace with PIPEnsControlOut/CONTROLnsRequestOut.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:20 -07:00
Malcolm Priestley
7af94000fe staging: vt6656: lock changes: Remove spin locks.
Remove atomic paths to usbpipe.c PIPEnsControlOut and PIPEnsControlIn

Remove from
PIPEnsControlOut
PIPEnsControlIn
BSSvSecondCallBack
vt6656_hostap_ioctl
iwctl_siwmode
iwctl_siwencode
iwctl_siwpower
iwctl_siwencodeext
KeyvInitTable
device_init_registers
device_open
device_close

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:19 -07:00
Martin Kepplinger
ea9a8dae5a staging: vt6656: make spin_lock_irq() human readable
Don't require FIRMWAREbDownload() to, first off, unlock a held lock.
Thus do all locking in main_usb.c and hold it for a insignificantly
shorter period of time. This makes the affected area significantly more
readable though.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:28:16 -07:00
Cédric Cabessa
f2ca407b96 staging: vt6655,vt6656: fix sparse error "unexpected unlock"
Signed-off-by: Cédric Cabessa <ced@ryick.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:07:42 -07:00
Nandini Hanumanthagowda
1c3e56f99c staging: vt6656: removed line over 80 chars warning
Removed the checkpatch warning of line over 80 chars
by breaking the long line into sensible chunks of 2 lines
to comply with coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda
efbe51829f staging: vt6656: removed C99-style comments
Linux style for comment is C89 style "/* */" and it
doesn't prefer C99-style comment "//...". Hence replaced
C99-style comments used in code by C89 style comment to
comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda
5a69f36db3 staging: vt6656: removed unnecessary parentheses in return statement
There was parentheses around return statement's value which
was not required since return statement is not a function.
Hence removed the parentheses to eliminate the checkpatch error
which states:
	ERROR: return is not a function, parentheses are not required

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda
fc044ac39c staging: vt6656: removal of braces under if-control statement
Removed braces under if-else control flow statement whenever
there is only one statement under if-else control statement
to comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda
1266ed7633 staging: vt6656: indentation and removal of unnecessary spaces
Removed unnecessary white spaces at beginning of line
and added proper indentation to fix checkpatch warnings/errors
to improve the readability of code

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:16 -07:00
Andres More
9fbafdd9ad staging: vt6656: remove consecutive newlines
Several sed -i '/^$/{ N /^\n$/ D }' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28 16:06:27 -07:00
Andres More
00d0603cbd staging: vt6656: remove code placeholders
Removed comments from coding template.
sed -i '/^\/\*---/d' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:06:09 -07:00
Andres More
b902fbfebf staging: vt6656: replaced custom BYTE definition with u8
Checkpatch findings were not resolved, only direct replacement.

sed -i 's/\bBYTE\b/u8/g' drivers/staging/vt6656/*.[ch]
sed -i 's/\bPBYTE\b/u8 */g' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:18:46 -07:00
Andres More
4e9b5e2b8b staging: vt6656: replaced custom TRUE definition with true
Checkpatch findings were not resolved, just direct replacement.

sed -i 's/\bTRUE\b/true/g' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15 10:48:24 -08:00
Andres More
e269fc2d12 staging: vt6656: replaced custom FALSE definition with false
Checkpatch findings were not resolved, just direct replacement.

sed -i 's/\bFALSE\b/false/g' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15 10:47:52 -08:00
Andres More
dfdcc42597 staging: vt6656: replace custom BOOL definition with bool
Checkpatch findings were not resolved, just make direct replacement
plus a couple of conflicting types in declarations.

sed -i 's/\bBOOL\b/bool/g' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15 10:46:44 -08:00
Malcolm Priestley
fe5d00ebd3 staging: vt6656: channel/control/firmware/int/usbpipe to new structures
This patch cleans up function declarations, definitions and local variables
where appropriate replacing types defined in "ttype.h" with linux/types.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 11:13:33 -08:00
Malcolm Priestley
f20fbdf829 staging: vt6656: Keep firmware loading local and release firware.
Firmware is retained unreleased for the entire duration of the
driver.

When done release firmware and if the need be request firmware again.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:26:40 -07:00
Ilia Mirkin
1d5c536efe staging: vt6656: Remove NULL check before kfree
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:57:37 -07:00
Ben Hutchings
31d5bbf3da vt6656: Use request_firmware() to load firmware
The file added to linux-firmware is a copy of the current array which
does not have a recognisable header, so no validation is done.

Change the firmware version check to accept newer versions.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:19:11 -08:00
Diego H. Iglesias
b168ae4d4b staging: vt6656: removed not required parentheses.
Removed not required parentheses in return statements.

Signed-off-by: Diego H. Iglesias <diegohi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:34 -07:00
Andres More
27264fb8c7 staging: vt6656: removed NDIS_STATUS int redefinition
Removed int redefinition for function results.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:31:26 -07:00
Andres More
6487c49e8a staging: vt6656: removed NTSTATUS definition
Replaced NTSTATUS with int, as defined in a couple of places.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:19:04 -07:00
Andres More
592ccfebb3 Staging: vt6656: Removed IN definition
Code cleanup, removed empty IN definition used to denote input parameters.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:56 -07:00
Randy Dunlap
9885369813 Staging: vt665*: fix printk formats
Fix printk format warnings in vt665[56]:

drivers/staging/vt6655/wpa.c:150: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
drivers/staging/vt6655/wpa.c:181: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'

drivers/staging/vt6656/wpa.c:150: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
drivers/staging/vt6656/wpa.c:181: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
drivers/staging/vt6656/firmware.c:804: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:18 -08:00
Jim Lieb
3e362598fd Staging: vt665x: Remove umem.h Part 2
Remove references to umem.h macros and refer directly to memcpy
functions.  Delete the include file.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:08 -07:00
Jim Lieb
9d26d60f99 Staging: vt665x: Clean up include files, Part 1
Remove cplusplus lines from include files
Remove needless ifdefs on includes to conform with C
conventions.  Remove misc commented code/includes
Update TODO

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Jim Lieb
193a823caa Staging: vt665x: Typedef and macro cleanup Part 1
Clean up unused typedefs and macros to remove Win32'isms and
misc non-linux constructs.  Text edits to referencing
source for less frequently used macros.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Jim Lieb
d899d40386 Staging: vt665x: 64bit compile fixes Part 2
Fix compile problems with 64bit.  These issues could cause corrupted
address crashes. Cleanup definition use to use more portable kernel
typedefs etc.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Forest Bond
92b9679711 Staging: Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.
Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.  These
files were copied from the driver directory in the upstream source archive,
available here:

  http://www.viaarena.com/Driver/VT6656_Linux_src_v1.19_12_x86.zip

After copying, trailing whitespace was stripped.  This is GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00