1
0
Fork 0
Commit Graph

24 Commits (978298888e3efb4fd7ff9bf2b9ed6f8de4a1312e)

Author SHA1 Message Date
Yisheng Xie e986b667ea Staging: gdm724x: use match_string() helper
match_string() returns the index of an array for a matching string,
which can be used instead of open coded variant.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Quytelda Kahja <quytelda@tamalin.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17 09:05:13 +02:00
Greg Kroah-Hartman ad9bd58c2a staging: gdm724x: remove redundant license information
Now that the SPDX tag is in all gdm724x 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.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26 09:17:34 +02:00
Greg Kroah-Hartman 1146ee4a9a staging: gdm724x: add SPDX identifiers to all files.
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the all of the staging gdm724x files to have a proper SPDX
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.

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>
2018-04-26 09:17:34 +02:00
Quytelda Kahja 343216fd5d Staging: gdm724x: tty: Remove unused macro 'gdm_tty_send_control'.
Remove the macro 'gdm_tty_send_control' which adds unnecessary complexity,
is unused, and has arguments that could mistakenly be evaluated multiple
times.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19 18:06:36 +01:00
Quytelda Kahja 7c82bafec5 Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_recv'.
Remove the macro 'gdm_tty_recv' which adds unnecessary complexity and has
arguments that could mistakenly be evaluated multiple times.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19 18:06:36 +01:00
Quytelda Kahja 03d6973621 Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_send'.
Remove the macro 'gdm_tty_send' which adds unnecessary complexity and has
arguments that could mistakenly be evaluated multiple times.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19 18:06:35 +01:00
Gargi Sharma c95d2e87fc staging: gdm724x: Replace ternary operator with min macro
Use macro min() to get the minimum of two values for
brevity and readability. The macro MUX_TX_MAX_SIZE
has a value of 2048 which is well within the integer
limits. This check was done manually.

Found using Coccinelle:
@@ type T; T x; T y; @@
(
- x < y ? x : y
+ min(x,y)
|
- x > y ? x : y
+ max(x,y)
)

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 18:50:05 +01:00
Samuele Baisi 02875bd932 Staging: gdm724x: gdm_tty: Fixed a checkpatch check issue.
Removed a blankline after an opening bracket.

Signed-off-by: Samuele Baisi <ciccio87@gmail.com>
Acked-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:04:44 +02:00
Aya Mahfouz e16a48845d staging: gdm724x: constify tty_port_operations structs
Constifies tty_port_operations structure in
the tty code of the gdm724x driver since it
is not modified after its initialization.

Detected and found using Coccinelle.

Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-26 17:13:33 -08:00
Ioana Ciornei 7b7df122f8 staging: gdm724x: correct kzalloc/kmalloc sizeof argument
This patch converts sizeof(TYPE) to sizeof(VAR) when used as
a kzalloc/kmaloc argument.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Ioana Ciornei ba7f55b705 staging: gdm724x: add spaces around binary operators
This patch add spaces around binary operators in order
to follow kernel coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Ioana Ciornei b6f6fd8a87 stating: gdm724x: remove explicit NULL comparison
This patch converts explicit NULL comparison to its shorter
equivalent form.
Done with coccinelle semantic patch:

@@
expression e;
@@

- e == NULL
+ !e

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Shraddha Barke 2594ca30c0 Staging: gdm724x: Remove unnecessary cast on void pointer
void pointers do not need to be cast to other pointer types.

Semantic patch:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:51:48 -07:00
Kiran Padwal f4ef08f0c1 Staging: gdm724x: gdm_tty.c: fix missing blank line after variable declaration
Checkpatch fix - Add missing blank line after variable declaration

Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:05:47 -07:00
Paul Gortmaker 885a947e5b staging: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 10:08:14 -08:00
Ebru Akagunduz 208b867139 Staging: gdm724x: fix line over 80 characters in gdm_tty.c
Fix checkpatch.pl issues wtih line over 80 characters
in gdm_tty.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:09:57 -07:00
Fengguang Wu 7ca1ea6602 staging: gdm7240: gdm_driver[] can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 17:08:16 -07:00
Won Kang bf0373f1c6 staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Fixed mis-use of mutex for gdm_table. gdm_table is refered to only
inside tty_install and port destrcut, and usb callbacks use internal
reference which was saved during urb submission

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:30:59 -07:00
Won Kang 7ee4c1b949 staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Removed the old style reference countings and termios.
Renamed variables to meaninful ones.

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:30:59 -07:00
Sachin Kamat c47a5863b6 staging: gdm724x: Remove version.h header inclusion in gdm_tty.c
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25 12:11:58 -07:00
Joe Perches 0ec473b526 staging: gdm724x: Update logging
Make the logging prefixes match the module names
by adding #define pr_fmt(fmt) KBUILD_MODNAME and
converting printks to netdev_<level> when a
struct netdevice * is available and and pr_<level>
when not.

Remove embedded prefixes.
Add missing terminating newlines.
Remove an unnecessary rx-dropped message.
Remove an unnecessary temporary variable.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 15:11:20 -07:00
Greg Kroah-Hartman 497a2e02a1 staging: gdm724x: remove unneeded TO_HOST_SUCCESS enum
0 is always success in the kernel, just use that.

Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 13:22:29 -07:00
Greg Kroah-Hartman 57a39f6d72 staging: gdm724x: gdm_tty: fix tty api build warnings
This fixes the build warnings due to changes in the tty api.  Note, I
don't know if the reference counting is correct, but at least there are
no more build warnings.

Also the tty code needs to be reworked, no static arrays of tty devices
and the like...

Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 13:15:23 -07:00
Won Kang 61e1210476 staging: gdm7240: adding LTE USB driver
GCT Semiconductor GDM7240 is 4G LTE chip.
This driver supports GCT reference platform as a USB device.

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 13:09:44 -07:00