summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgap
Commit message (Collapse)AuthorAgeFilesLines
* staging: dgap: fix the rest of the checkpatch warnings in dgap.cMark Hounschell2014-03-192-63/+42
| | | | | | | | | | This patch fixes all the simple_strtol and simple_strtoul warnings as reported by checkpatch. After this patch, checkpatch will report zero errors or warnings on dgap.c. Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: re-factor some more code for 80+ linesMark Hounschell2014-03-191-15/+25
| | | | | | | | This patch fixes more 80+ char lines as reported by checkpatch Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: get rid of DGAP_LOCK and DGAP_UNLOCK macrosMark Hounschell2014-03-192-227/+222
| | | | | | | | This patch replaces the DGAP_LOCK and DGAP_UNLOCK macros with spin_lock_irqsave spin_unlock_irqrestore. Signed-off-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: re-factor some code for 80+ lines as reported by checkpatchMark Hounschell2014-03-191-72/+35
| | | | | | | | | | | This patch re-factors some code to fix some 80+ lines as reported by checkpatch. This patch was suggested and authored by Dan Carpenter. A test case for this patch has been written and used to show the patch to be correct. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: Fixed sparse error: same symbol redeclared with different typeMasood Mehmood2014-03-181-7/+6
| | | | | | | | | | | | | | sparse reported dgap_do_fep_load is redeclared with different type. while fixing, I noticed __user attribute is used incorrectly in declaration. There is no need to define __user for firware->data. Replaced the __user with 'const uchar *' from function dgap_do_fep_load and did the same for function dgap_do_bios_load patch generated against: next-20140318 Signed-off-by: Masood Mehmood <ody.guru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: Add a pr_info per board infoMark Hounschell2014-03-171-0/+4
| | | | | | | | This patch adds a pr_info per board that indicates board number, type, etc.. Signed-off-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: remove more unneeded brd-state statesMark Hounschell2014-03-172-20/+17
| | | | | | | | This patch removes more unneeded brd-state states Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: remove unused brd->state statesMark Hounschell2014-03-172-22/+0
| | | | | | | | | This patch removes unused brd->state states previously used in the userland firmware download process. Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: remove unneeded dgap_driver_statesMark Hounschell2014-03-172-27/+1
| | | | | | | | | | The only driver states we need now is READY or !READY. No need for a sysfs method of seeing those 2 states so the sysfs entries for dgap_driver_state is also removed. Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: Replace/remove DGAP_SPINLOCK_INIT macroMark Hounschell2014-03-172-3/+2
| | | | | | | This patch gets rid of the DGAP_SPINLOCK_INIT macro Signed-off-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: Remove unused DGAP_TRYLOCK macroMark Hounschell2014-03-171-1/+0
| | | | | | | This patch removes the unused DGAP_TRYLOCK macro Signed-off-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: Remove unneeded code from dgap.cMark Hounschell2014-03-171-149/+0
| | | | | | | | | This patch removes more unneeded code that was supporting the old firmware loading process Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: remove some unused defines in dgap.hMark Hounschell2014-03-171-51/+2
| | | | | | | This patch removes some unused defines in dgap.h Signed-off-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: fix a few more 80+ char lines (02/02)Mark Hounschell2014-03-171-9/+17
| | | | | | | This patch fixes a few more 80+ char lines as reported by checkpatch Signed-off-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: fix a few more 80+ char lines (01/02)Mark Hounschell2014-03-171-49/+113
| | | | | | | This patch fixes a few more 80+ char lines as reported by checkpatch Signed-off-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: fix a few 80+ char linesMark Hounschell2014-03-171-25/+30
| | | | | | | | 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>
* staging: dgap: Fix mismatch in function argument typesHimangi Saraogi2014-03-161-1/+1
| | | | | | | | | This patch fixes the following error reported by sparse: drivers/staging/dgap/dgap.c:4428:13: error: symbol 'dgap_do_fep_load' redeclared with different type (originally declared at drivers/staging/dgap/dgap.c:215) - incompatible argument 2 (different address spaces) Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
* staging: dgap: implement proper error handling in dgap_start()Alexey Khoroshilov2014-03-081-1/+17
| | | | | | | | | | dgap_start() ignored errors in class_create() and device_create(). The patch implements proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: remove unneeded status variablesAlexey Khoroshilov2014-03-081-48/+33
| | | | | | | | | | | | | | | dgap_driver_start and dgap_Major_Control_Registered are used to keep status of initialization of the driver as a whole and its "Major Control". But the code that checks them is executed once on module init/unload. That makes no sense in these variables as far as their values are predictable at any time. Also "dgap_downld" device was removed, while device_destroy(MKDEV(DIGI_DGAP_MAJOR, 1)) is still in dgap_cleanup_module(). The patch removes it by the way. Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:dgap: Fix Macros with complex values should be enclosed in dgap.hEbru Akagunduz2014-03-081-28/+28
| | | | | | | | | Fix checkpatch.pl issues with macros with complex values should be enclosed in dgap.h Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:dgap: Fix "foo * bar" should be "foo *bar" in dgap.hEbru Akagunduz2014-03-071-1/+1
| | | | | | | | | Fix checkpatch.pl issues with "foo * bar" should be "foo *bar" in dgap.h Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:dgap: Fix open brace '{' following struct go on the same line in dgap.hEbru Akagunduz2014-03-071-4/+2
| | | | | | | | | Fix checkpatch.pl issues with open brace '{' following struct go on the same line in dgap.h Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgap: Simplify and cleanup dgap_init_module functionMark Hounschell2014-03-061-25/+13
| | | | | | | | | 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>
* staging: dgap: Remove printks associated with sysfile creationMark Hounschell2014-03-061-20/+19
| | | | | | | | | | | | | | | 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>
* staging: dgap: Remove some dead codeMark Hounschell2014-03-061-84/+3
| | | | | | | | | | | 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>
* staging: dgap: fix a few more 80+ lines as reported by checkpatchMark Hounschell2014-03-061-7/+16
| | | | | | | 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>
* staging: dgap: fix a few more 80+ lines as reported by checkpatchMark Hounschell2014-03-061-33/+67
| | | | | | | 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>
* staging: dgap: fix a few more 80+ lines as reported by checkpatchMark Hounschell2014-03-061-18/+34
| | | | | | | 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>
* staging: dgap: fix a few 80+ char lines as reported by checkpatchMark Hounschell2014-03-062-145/+179
| | | | | | | | 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>
* staging: dgap: fix suspect code indent for conditional statements checkpatch ↵Mark Hounschell2014-03-061-7/+9
| | | | | | | | | | 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>
* staging: dgap: fix checkpatch warning on sscanf usageMark Hounschell2014-03-061-1/+2
| | | | | | | | 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>
* staging: dgap: Remove module param and sysfs var rawreadokMark Hounschell2014-03-061-26/+0
| | | | | | | | | 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>
* staging: dgap: remove unnecessary dgap_global_lockMark Hounschell2014-03-061-9/+1
| | | | | | | | 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>
* staging: dgap: Don't remove sysfs group we failed to createMark Hounschell2014-03-061-3/+1
| | | | | | | 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>
* staging: dgap: fix some pr_warns with new lines in the stringMark Hounschell2014-03-061-5/+9
| | | | | | | | | 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>
* staging: dgap: Add curly braces back in for Multi-line indent blockMark Hounschell2014-03-061-1/+2
| | | | | | | 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>
* staging: dgap: get rid of nasty DGAP_VERIFY_BOARD macroMark Hounschell2014-03-061-19/+43
| | | | | | | | | 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>
* staging: dgap: Remove more degug/tracing codeMark Hounschell2014-03-062-32/+0
| | | | | | | | 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>
* staging: dgap: Fix various previously missed checkpatch errorsMark Hounschell2014-03-061-11/+8
| | | | | | | | | | | | | | | | 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>
* staging: dgap: Fix printk related errors as reported by checkpatchMark Hounschell2014-03-061-4/+2
| | | | | | | 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>
* staging:dgap: Fix externs should be avoided in .c files as reported by ↵Mark Hounschell2014-03-061-6/+5
| | | | | | | | | | 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>
* staging: dgap: fix do not use assignment in if condition as reported by ↵Mark Hounschell2014-02-281-25/+50
| | | | | | | | | | 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>
* staging: dgap: Fix white space errors as reported by checkpatchMark Hounschell2014-02-281-228/+86
| | | | | | | | | | 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>
* staging: dgap: Fix bracing errors reported by checkpatchMark Hounschell2014-02-281-217/+121
| | | | | | | | 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>
* staging: dgap: Fix include errs reported by checkpatchMark Hounschell2014-02-281-2/+2
| | | | | | | | 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>
* staging: dgap: Fix foo* bar should be foo *bar as reported by checkpatchMark Hounschell2014-02-281-2/+2
| | | | | | | | 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>
* staging: dgap: Fix indent errs as reported by checkpatchMark Hounschell2014-02-281-71/+77
| | | | | | | 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>
* staging: dgap: Fix all return statments in err as reported by checkpatchMark Hounschell2014-02-281-336/+336
| | | | | | | 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>
* staging:dgap: remove digi debug and tracing codeMark Hounschell2014-02-282-603/+58
| | | | | | | | | 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>
* staging: dgap: fix kernel oops on port openMark Hounschell2014-02-272-12/+43
| | | | | | | | | | | | | 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>