Commit Graph

104 Commits

Author SHA1 Message Date
Mark Hounschell
002de0ba87 staging: dgap: Simplify and cleanup dgap_init_module function
This patch simplifies and cleans up the dgap_init_module function. It also fixes
a possible double free condition as a result pci_unregister_driver possibly
being called twice.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:16:40 -08:00
Mark Hounschell
434b679bdb staging: dgap: Remove printks associated with sysfile creation
This patch removes printks associated with sysfile creation
and changes the dgap_create_driver_sysfiles function to return
an int so we can check for errors in the sysfile creation
process.

The printk's were flagged by checkpatch but then
driver_create_file was flagged by checkpatch for
not checking its return. So we remove the printk's
and check the return of driver_create_file.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:16:40 -08:00
Mark Hounschell
6126022800 staging: dgap: Remove some dead code
This patch removes more dead code and code associated
with that dead code. The from_user variable in the
dgap_tty_write function was never true. The code under
its test was never being executed. So variables and
functions supporting only that code are also dead.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:16:39 -08:00
Mark Hounschell
8fc324e4ae staging: dgap: fix a few more 80+ lines as reported by checkpatch
This patch fixes a few 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:16:39 -08:00
Mark Hounschell
8a2c9c44ce staging: dgap: fix a few more 80+ lines as reported by checkpatch
This patch fixes a few 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:16:39 -08:00
Mark Hounschell
6045b6af49 staging: dgap: fix a few more 80+ lines as reported by checkpatch
This patch fixes a few 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:16:39 -08:00
Mark Hounschell
2f60b3336c staging: dgap: fix a few 80+ char lines as reported by checkpatch
This patch fixes a few of the many 80+ character lines
as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:14:37 -08:00
Mark Hounschell
af5b80bef9 staging: dgap: fix suspect code indent for conditional statements checkpatch warning
This patch fixes a checkpatch warning for
suspect code indent for conditional statements

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:14:37 -08:00
Mark Hounschell
c4875ebf2e staging: dgap: fix checkpatch warning on sscanf usage
This patch fixes a checkpatch warning for not checking
the return value of sscanf.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:14:37 -08:00
Mark Hounschell
c96f565e88 staging: dgap: Remove module param and sysfs var rawreadok
This patch removes the rawreadok module param and sysfs var
previously used to enable flip buffer bypass. Code dealing
with that param was removed previously.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:14:37 -08:00
Mark Hounschell
a9072fe056 staging: dgap: remove unnecessary dgap_global_lock
dgap_global_lock is no longer required. This patch
removes it.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:14:37 -08:00
Mark Hounschell
54794d196b staging: dgap: Don't remove sysfs group we failed to create
We should not remove a sysfs group we failed to create

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:14:36 -08:00
Mark Hounschell
249e7343c4 staging: dgap: fix some pr_warns with new lines in the string
This patch fixes some pr_warns that have newline
chars in the string because they mess up the
output.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:12:47 -08:00
Mark Hounschell
82ed97747d staging: dgap: Add curly braces back in for Multi-line indent block
Multi-line indent blocks get curly braces for readability.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:12:47 -08:00
Mark Hounschell
3eb141511b staging: dgap: get rid of nasty DGAP_VERIFY_BOARD macro
This patch replaces the DGAP_VERIFY_BOARD macro with
the dgap_verify_board function because of checkpatch error.

Signed-off-by: Mark Hounschell <markh@compro.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:10:58 -08:00
Mark Hounschell
dc7fcc96d9 staging: dgap: Remove more degug/tracing code
This patch removes more, if not all, of the debug/tracing code

Signed-off-by: Mark Hounschell <markh@compro.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:10:58 -08:00
Mark Hounschell
9b073ac53e staging: dgap: Fix various previously missed checkpatch errors
This patch fixes various small checkpatch errors
I missed in patches 01-10.

Remove check for kfree of brd->channels as kfree is safe.
Also there is no need to set it to NULL after freeing it.

Remove a useless cast for a kzalloc return value.

Remove double negative test in a white space fix line.

Signed-off-by: Mark Hounschell <markh@compro.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 14:10:58 -08:00
Mark Hounschell
8cbb5e3f9d staging: dgap: Fix printk related errors as reported by checkpatch
This patch fixes some printk related errors report by checkpatch.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 12:05:20 -08:00
Mark Hounschell
01a8d25518 staging:dgap: Fix externs should be avoided in .c files as reported by checkpatch
This patch fixes "externs should be avoided in .c files"
in dgap.c as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 12:04:12 -08:00
Mark Hounschell
d1c3c6f5de staging: dgap: fix do not use assignment in if condition as reported by checkpatch
This patch fixes "do not use assignment in if condition"
errors reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 15:03:58 -08:00
Mark Hounschell
b115b024c4 staging: dgap: Fix white space errors as reported by checkpatch
This patch fixes white space errors in dgap.c
as reported by checkpatch. It also changes
unnecessary mutliple empty lines with a single
empty line

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 15:00:28 -08:00
Mark Hounschell
305ec8740d staging: dgap: Fix bracing errors reported by checkpatch
This patch fixes bracing errors in dgap.c
as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 14:58:00 -08:00
Mark Hounschell
3d9dc5db40 staging: dgap: Fix include errs reported by checkpatch
This patch fixes all "include" related errors in
dgap.c as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 14:58:00 -08:00
Mark Hounschell
5e9d817271 staging: dgap: Fix foo* bar should be foo *bar as reported by checkpatch
This patch fixes "foo* bar should be foo *bar" errors
in dgap.c as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 14:57:59 -08:00
Mark Hounschell
7d6069d785 staging: dgap: Fix indent errs as reported by checkpatch
This patch fixes all indent errs in dgap.c as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 14:50:31 -08:00
Mark Hounschell
cf42c34df5 staging: dgap: Fix all return statments in err as reported by checkpatch
Fix all return staments in err as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 14:50:30 -08:00
Mark Hounschell
31960c16c4 staging:dgap: remove digi debug and tracing code
The original debug and tracing code is no longer required.
This patch removes it

Signed-off-by: Mark Hounschell <markh@compro.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 14:34:09 -08:00
Mark Hounschell
6c8b84efe5 staging: dgap: fix kernel oops on port open
This patch addresses the follow error message followed
by a kernel oops:

dgap: driver does not set tty->port. This will crash the kernel later. Fix the driver

It also renames the main function this patch addresses because
its name is misleading.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 12:58:16 -08:00
Mark Hounschell
e0f9dfaf01 staging: dgap: fix compile warnings by remove dead code
The last patch series exposed some dead code causing compile warnings.
This patch removes that dead code and fixes the warnings

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-25 07:36:21 -08:00
Mark Hounschell
b28ec88a1d staging: dgap: Add in-kernel firmware loading support
This patch adds in-kernel firmware loading support and removes
support for the original userland firmware loading process.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:50:14 -08:00
Mark Hounschell
ffc1c1da7f staging: dgap: Rename driver
Renames driver file dgap_driver.c and dgap_driver.h to
dgap.c and dgap.h because we are now single source and
include file and better fits kernel naming conventions.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:44 -08:00
Mark Hounschell
fe0ef8e666 staging: dgap: Make merged and local functions and variables static
This patch makes all merged and original functions static to dgap.c.
Doing so has revealed more dead code via gcc warnings.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
31f2a1b67c staging: dgap: Merge digi.h into dgap_driver.h
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
4c15e811b2 staging: dgap: Merge dgap_types.h into dgap_driver.h
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
81d5fb3c59 staging: dgap: Merge dgap_kcompat.h into dgap_driver.h
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
9e9b3bb769 staging: dgap: Merge dgap_parse.h into dgap_driver.h
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
e49a00bceb staging: dgap: Merge dgap_conf.h into dgap_driver.h
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
2d9adf208b staging: dgap: Merge dgap_pci.h into dgap_driver.h
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
fec6c4e0e7 staging: dgap: Merge dgap_fep5.h into dgap_driver.h
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
30580a78a9 staging: dgap: Merge dgap_sysfs.h into dgap_driver.c
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
4aeafa8761 staging: dgap: Merge dgap_tty.h into dgap_driver.c
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:12 -08:00
Mark Hounschell
26e744a45a staging: dgap: Remove unneeded dgap_trace.c and dgap_trace.h
Removes unneeded files dgap_trace.c and dgap_trace.h

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:11 -08:00
Mark Hounschell
69edaa21fc staging: dgap: Merge dgap_parses.c into dgap_driver.c
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:11 -08:00
Mark Hounschell
7568f7d3ef staging: dgap: Merge dgap_sysfs.c into dgap_driver.c
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:11 -08:00
Mark Hounschell
b053bb86a9 staging: dgap: Merge dgap_fep5.c into dgap_driver.c
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:48:11 -08:00
Mark Hounschell
a6792a3e6e staging: dgap: Merge dgap_tty.c into dgap_driver.c
There is a lot of cleanup work to do on these digi drivers and merging as
much as is possible will make it easier. I also notice that many merged
drivers are single source and header.

Signed-off-by: Mark Hounschell <markh@compro.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:44:19 -08:00
Mark Hounschell
be94358bb8 staging: dgap: Remove userland source code files
This patch removes userland source code files downld.c and dgap_downld.h

Signed-off-by: Mark Hounschell <markh@compro.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:44:19 -08:00
Mark Hounschell
581b499a51 staging: dgap: Remove CVS ID tags
This patch removes all the original CVS tags because they are in my way

Signed-off-by: Mark Hounschell <markh@compro.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:44:19 -08:00
Lidza Louina
c34ca5a97b staging: dgap: removes version.h dependency
This patch removes the version.h dependencies to the
driver.h, fep5.c and tty.c files. This header was used
to help the driver support different versions of the
kernel. The support for different versions was removed
in a previous patch.

Signed-off-by: Lidza Louina <Lidza.Louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:05:00 -08:00
Lidza Louina
60914a1ad3 staging: dgap: removes KERNEL_VERSION conditionals
This patch removes the KERNEL_VERSION conditionals.
The driver is built for this kernel version, so the
conditionals are not needed.

Signed-off-by: Lidza Louina <Lidza.Louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:05:00 -08:00