Commit graph

16 commits

Author SHA1 Message Date
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