Commit Graph

67 Commits

Author SHA1 Message Date
Srishti Sharma f46cf70e23 Staging: dgnc: Remove unused fields in struct channel_t
Eliminate the fields that are not used and the comments
associated with them.

Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18 11:45:25 +02:00
Srishti Sharma 1086f7c44f Staging: dgnc: Remove unused fields in struct dgnc_board
Remove unused fields and comments associated with them in
the structure definition.

Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18 11:45:25 +02:00
Aastha Gupta 64ffaf29a9 staging: dgnc: remove unused variable
This patch removes unused variable.

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18 11:45:25 +02:00
Haim Daniel e3b5fde7eb drivers/staging: refactor dgnc tty registration.
-remove duplicate tty allocation code for serial and printer drivers.
-add missing tty c_ispeed and c_ospeed initialization to 9600.
-fix sparse warning: too long initializer-string for array of char.

This patch was only unit tested due to lack of the actual hardware.

Signed-off-by: Haim Daniel <haimdaniel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:55:23 +02:00
Tobin C. Harding 0053fe0eba staging: dgnc: remove struct member magic numbers
Driver uses magic number members within structs, this is an antiquated
method of catching data errors. We don't do things that way any more.

Remove magic number struct members. Remove all checks to magic
numbers.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Tobin C. Harding 2539fc0c7c staging: dgnc: remove double underscore
Pre-processor header guards use double underscore, typically kernel
code uses single underscore when defining header guards. 'endif'
statement should include what is ending as a comment string.

Remove double underscore, add comment string to 'endif'

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Tobin C. Harding e14047e4e3 staging: dgnc: clean up header comments
TODO file has task: remove unnecessary comments. Driver uses some
custom comment format. Driver would be better if it used kernel doc
format.

Audit header file comments. Replace struct comments with kernel doc
format comments. Remove unnecessary comments.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Greg Kroah-Hartman 1eb388b67a staging: dgnc: remove sysfs files
The dgnc driver has no business creating "custom" sysfs files just for a
single tty driver.  Combined with the odd way they are created, it's
just a mess, so remove them entirely as I am tired of tripping over them
when doing driver core changes.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01 09:57:49 +01:00
Walt Feasel 46d567e65b staging: dgnc: dgnc_driver.h Spelling correction
Make spelling correction for 'statements'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel 57fa74f39c staging: dgnc: dgnc_driver.h Align columns
Make modifications to align columns

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Walt Feasel 7cc7ded614 staging: dgnc: dgnc_driver.h Comment style modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19 14:21:59 +01:00
Daeseok Youn 1cd7c06213 staging: dgnc: remove useless variables
The dgnc_major_serial_registered and dgnc_major_serial_registered
do not need to use to check whether the tty driver is registered or not.
These variables are used only in dgnc_cleanup_tty() function,
This function will be called normally with initialized board structure.
It means the dgnc_cleanup_tty() cannot be called with unregistered tty.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:12:26 +02:00
Daeseok Youn f530834ef4 staging: dgnc: remove useless message buffer
There is a temporary message buffer for the boot message
in dgnc_found_board() but the buffer was not used anywhere in
dgnc driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:12:25 +02:00
Anson Jacob f56edd42ee staging: dgnc: fix 'line over 80 characters'
fix checkpatch.pl warning about 'line over 80 characters'.

Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 17:56:44 +02:00
Daeseok Youn 4875bb884e staging: dgnc: remove useless variable 'ch_intr_rx'
The 'ch_intr_rx' variable was used only for increasing.
So the 'ch_intr_rx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn 2c7d924e28 staging: dgnc: remove useless variable 'ch_intr_tx'
The 'ch_intr_tx' variable was used only for increasing.
So the 'ch_intr_tx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn 74c900f5e9 staging: dgnc: remove useless variable 'ch_intr_modem'
The 'ch_intr_modem' variable was used only for increasing.
So the 'ch_intr_modem' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn 572f4f61cd staging: dgnc: remove useless variable 'intr_rx'
The 'intr_rx' variable was used only for increasing.
So the 'intr_rx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn 262c5e1bab staging: dgnc: remove useless variable 'intr_tx'
The 'intr_tx' variable was used only for increasing.
So the 'intr_tx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:26 +02:00
Daeseok Youn ca0d0b889c staging: dgnc: remove unused variable 'intr_modem'
The 'intr_modem' variable was used only for increasing.
So the 'intr_modem' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:25 +02:00
Daeseok Youn fb7d94a758 staging: dgnc: remove useless variable 'intr_count'
The 'intr_count' variable was used only for increasing.
So the 'intr_count' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:13:25 +02:00
Daeseok Youn 60b3109e5e staging: dgnc: use tty_alloc_driver instead of kcalloc
The tty_alloc_driver() can allocate memory for ttys and termios.
And also allocated memory will be released easily with
put_tty_driver() call.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29 17:46:00 -07:00
Daeseok Youn e491e716dc staging: dgnc: remove useless variables for saving tty's
It doesn't need to save major number with variable.
And there are no use of these variables(dgnc_serial_major and
dgnc_transparent_print_major)

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-31 13:11:27 -07:00
Daeseok Youn 195d85c1a0 staging: dgnc: remove unused variable in dgnc_board
TtyRefCnt was not used anywhere in dgnc.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Daeseok Youn a25ad52020 staging: dgnc: fix CamelCase in dgnc_drvier.h and
fix checkpatch.pl warning about CamelCase

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Daeseok Youn 80e3e241fa staging: dgnc: fix CamelCase in dgnc_driver.c
fix checkpatch.pl warning about CamelCase.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Daeseok Youn 992aa7b59f staging: dgnc: fix camelcase of SerialDriver and PrintDriver
fix the checkpatch.pl warning about CamelCase.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Rehas Sachdeva 05b30f4999 staging: dgnc: Avoid multiple blank lines
This patch fixes the checkpatch.pl warnings regarding multiple blank
lines as single blank line is the preferred coding style.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Cristina Moraru 51c826f073 staging: dgnc: Fix lines over 80 characters
Fix 'line over 80 characters' checkpatch.pl
warnings

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:56:23 -07:00
Salah Triki 51abf45c23 staging: dgnc: take a lock when storing value in dgnc_poll_tick
Reads of dgnc_poll_tick are protected by dgnc_poll_lock spinlock, but the write
to dgnc_poll_tick is not. It could theoretically race.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:30:14 +01:00
Navy Cheng f3c709b8fc Staging: dgnc: dgnc_driver.h: remove unnecessary comments
The public headers is well known by others and the redundant commits make
the code mess. Remove the comments of the public headers to make the code
tidy.

Signed-off-by: Navy Cheng <navych@126.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:14:53 -07:00
Hari Prasath Gujulan Elango d8a76d669a staging: dgnc: fix typo in comments secion
This patch fixes a typo in the comments section as warned by
checkpatch.pl

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 21:13:48 -07:00
Hari Prasath Gujulan Elango 0aae092b5e staging: dgnc: remove ununsed Macro
Remove the ununsed Macro

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:30:04 -07:00
Gujulan Elango, Hari Prasath (H.) 7960386273 staging: dgnc: delete all references to 'flipbuf'
This patch deletes all references to 'flipbuf'.Memory is allocated and
freed but never used anywhere in the driver.Also deleted an ununsed
Macro defined in the header file.

Signed-off-by: Gujulan Elango Hari Prasath <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:26:27 +09:00
Giedrius Statkevičius 20dad75285 dgnc: remove old 2.4-2.6 compat kernel defines
dgnc_kcompat.h contains some old legacy defines in case the kernel
doesn't have __user defined but for current kernel versions these
defines don't make sense and are useless so remove them. Move the
TTY_FLIPBUF_SIZE define to digi.h because it's used in the code.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24 15:40:59 +01:00
Giedrius Statkevičius d533a524a8 dgnc: use linux/types.h instead of dgnc_types.h
Dgnc_types.h unnecesarily defines TRUE as 1 and FALSE as 0 because we
already have a widely used linux/types.h so convert all TRUE to true,
FALSE to false and edit the dgnc_board struct to make sure it uses
"bool".

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24 15:40:59 +01:00
Giedrius Statkevičius 1f2e089f68 dgnc: clean up comments at start of files
Remove FSF address because it's known in the past that it has changed.
Also, remove the pointless "do not change the coding style" comments
because it's one of the reasons why it's in staging and it's quite
contradictory to what it says in TODO. Also, they contain wrong e-mails
of people which are responsible for these drivers - see TODO or
MAINTAINERS for that. We can preserve the original copyright at the top
of the most files because it shows who originally made them.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-12 11:11:17 +01:00
Giedrius Statkevičius d7f355d7b0 dgnc: Remove unneeded dgnc_state array of strings
Dgnc_state array of strings is never used anywhere and it seems pretty
useless anyway since the board state enum names speak for themselves.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-12 11:10:18 +01:00
Cass May f11cc56875 dgnc: Move DG_PART definition from Makefile to dgnc_driver.h
Avoid deprecated usage of EXTRA_CFLAGS by moving definition of DG_PART into dgnc_driver.h

Signed-off-by: Cass May <cass@cassm.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-12 11:05:27 +01:00
Vatika Harlalka 9e39ab27fb Staging: dgnc: Removed trailing whitespace to improve readability.
Removed trailing whitespaces to improve code readability and remove checkpatch warning.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-24 14:14:39 -08:00
Aya Mahfouz 2a71a3c7c7 staging: dgnc: remove debug symbols
This patch removes all of the debug symbols and the variable dgnc_debug
since they are not used anywhere in the code.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:12:39 +08:00
Aya Mahfouz ade5b9435b staging: dgnc: remove unused variable named rawreadok
This patch removes the variable rawreadok since it is only intialized
but not used in any of the driver functions.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:12:39 +08:00
Aya Mahfouz 6db43a9c38 staging: dgnc: dgnc_driver: remove all occurences of trcbuf_size
This patch removes the variable trcbuf_size given there is no real
use for it anymore. All of the debug variables in this driver is
basically dead code.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:12:39 +08:00
Somya Anand 36beff6e20 Staging: dgnc: Remove unused sniff code
The output written by dgnc_sniff_nowait_nolock() is never used
anywhere since commit 35cf904593 ("staging: dgnc: removes proc code")
deleted the code that used to copy it to user space.
dgnc_sniff_nowait_nolock() uses 'timeval' to create header timestamps for
the data dump.

32-bit systems using 'struct timeval' will break in the year 2038,
This patch removes dgnc_sniff_nowait_nolock() and all ch_sniff_* members
of struct channel_t defined in "dgnc_driver.h". It also removes their usage
from the driver files and hence y2038 issue is also resolved.

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 08:34:25 +08:00
Roberta Dobrescu 1f26adc94a staging: dgnc: Remove non-standard APR/RAPR printing macros
This patch removes non-standard macros used by dgnc driver for printing error
or debugging messages. These are replaced by dev_err/dev_dbg (when possible)
or pr_err. There were cases where the message is completely removed since is
not adding any useful information.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:18 +08:00
Ebru Akagunduz 446393e960 staging: dgnc: Fix do not add new typedefs
This patch fixes "do not add new typedefs"
checkpatch.pl warning in dgnc_types.h

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 09:37:44 -07:00
Roberta Dobrescu b4e28a6142 staging: dgnc: dgnc_driver.h: Remove non-standard spinlock's macros
This patch removes non-standard spinlock's macros as they are no longer
used by this driver.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:52:12 -04:00
Gulsah Kose f23e875fd2 staging: dgnc: Fix unnecessary space warning.
Fixed "Unnecessary space before function pointer argument" checkpatch.pl
warning in dgnc_driver.h

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:25:22 -07:00
Seunghun Lee 79f284d29b staging: dgnc: remove some unused macros
These macros do nothing, so remove it.

CC: Lidza Louina <lidza.louina@gmail.com>
CC: Mark Hounschell <markh@compro.net>
Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-31 13:00:16 -07:00
Seunghun Lee f1e51745eb staging: dgnc: remove DPR Macros and related codes.
In dgnc_drivers.h, DPR macro and DPR_* macros are defined but do nothing.

So remove them and related codes.

CC: Lidza Louina <lidza.louina@gmail.com>
CC: Mark Hounschell <markh@compro.net>
Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 14:02:34 -07:00