aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-03-17Merge tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds9-82/+63
Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 4.6-rc1. Lots of little things here, over 1600 patches or so. Notable is all of the good Lustre work happening, those developers have finally woken up and are cleaning up their code greatly. The Outreachy intern application process is also happening, which brought in another 400 or so patches. Full details are in the very long shortlog. All of these have been in linux-next with no reported issues" * tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1673 commits) staging: lustre: fix aligments in lnet selftest staging: lustre: report minimum of two buffers for LNet selftest load test staging: lustre: test for proper errno code in lstcon_rpc_trans_abort staging: lustre: filter remaining extra spacing for lnet selftest staging: lustre: remove extra spacing when setting variable for lnet selftest staging: lustre: remove extra spacing of variable declartions for lnet selftest staging: lustre: fix spacing issues checkpatch reported in lnet selftest staging: lustre: remove returns in void function for lnet selftest staging: lustre: fix bogus lst errors for lnet selftest staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzalloc staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc staging: android: ion: fix up file mode staging: ion: debugfs invalid gfp mask staging: rts5208: Replace pci_enable_device with pcim_enable_device Staging: ieee80211: Place constant on right side of the test. staging: speakup: Replace del_timer with del_timer_sync staging: lowmemorykiller: fix 2 checks that checkpatch complained staging: mt29f_spinand: Drop void pointer cast staging: rdma: hfi1: file_ops: Replace ALIGN with PAGE_ALIGN staging: rdma: hfi1: driver: Replace IS_ALIGNED with PAGE_ALIGNED ...
2016-03-11staging: dgnc: cleanup properlySudip Mukherjee1-8/+13
dgnc_cleanup_module() was called when the module unloaded to do a total cleanup and it was also called if pci_register_driver() fails. But dgnc_cleanup_module() will try dgnc_remove_driver_sysfiles() but the sysfiles will be created only if pci_register_driver() succeeds. So if pci_register_driver() fails and we try dgnc_cleanup_module() then we were getting: [ 942.001479] BUG: unable to handle kernel NULL pointer dereference at 00000018 [ 942.001482] IP: [<c122c7a8>] sysfs_remove_file_ns+0x8/0x20 with part of the call trace as: [ 942.001544] Call Trace: [ 942.001555] [<c149acc6>] driver_remove_file+0x16/0x20 [ 942.001571] [<f864a708>] dgnc_remove_driver_sysfiles+0x18/0x40 [dgnc] [ 942.001575] [<f8643ac7>] dgnc_cleanup_module+0x47/0x260 [dgnc] [ 942.001577] [<f86cb000>] ? 0xf86cb000 [ 942.001580] [<f86cb1e6>] dgnc_init_module+0x1e6/0x1000 [dgnc] Lets have a separate cleanup function which will execute dgnc_remove_driver_sysfiles() depending on the argument passed to it. Reported-by: Navy Cheng <navych@126.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: dgnc: unregister pci driverSudip Mukherjee1-2/+1
We may choose to load the module without the hardware present. That will register the pci driver but since probe will not succeed so dgnc_NumBoards will be 0. Now if we unload the module then the pci driver stays registered as dgnc_NumBoards is 0. And if we try to load the module again it fails with the error: "Driver 'dgnc' is already registered." Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: dgnc: remove pci_unregister_driverSudip Mukherjee1-14/+5
If pci_register_driver() fails then dgnc_NumBoards can never be more than zero. dgnc_NumBoards is incremented only at the end of a successful probe. And moreover if the pci driver has failed to register then we never need to unregister it. Lets just print the warning, perform the cleanup and exit with the error code. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: dgnc: remove unneeded elseSudip Mukherjee1-7/+7
If pci_enable_device() fails then we can return directly. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: dgnc: Break line after boolean operatorRehas Sachdeva1-2/+2
The preferred way to break up long math lines is to break after an arthimetic or boolean operator. This patch fixes the checkpatch.pl warning: Logical continuations should be on the previous line. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: dgnc: Fix block comment styleRehas Sachdeva1-8/+4
This patch fixes the block comment style. 1. The checkpatch.pl warning: Block comments use a trailing */ on a separate line. 2. '====' separator is unnecessary and should not be used. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: dgnc: Avoid multiple blank linesRehas Sachdeva3-10/+0
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-11staging: dgnc: Add spaces around '|' and '<<'Rehas Sachdeva2-22/+22
One space on either side of binary and ternary operators is preferred. This patch fixes the related checkpatch.pl warnings. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: dgnc: delete parentheses around right hand side of assignmentEva Rachel Retuya4-6/+6
Eliminate unneeded parentheses around the right hand side of an assignment. Coccinelle semantic patch used: @@ expression e1, e2; identifier v; @@ ( v = (e1 == e2) | v = (e1 != e2) | v = (e1 <= e2) | v = (e1 >= e2) | v = - ( e1 - ) ) Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: dgnc: convert to wait_event_interruptible_timeoutHari Prasath Gujulan Elango1-3/+3
This patch makes use of wait_event_interruptible_timeout to achieve timeout functionality.This is a TODO mentiond in the comment which is also removed.It also aligns with what the function is supposed to do as in the comments. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28tty: Use termios c_*flag macrosPeter Hurley1-1/+1
Expressions of the form "tty->termios.c_*flag & FLAG" are more clearly expressed with the termios flags macros, I_FLAG(), C_FLAG(), O_FLAG(), and L_FLAG(). Convert treewide. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-27staging: digi: Replace open-coded tty_wakeup()Peter Hurley1-16/+2
The open-coded tty_wakeup()s are attempts to workaround fixed bugs in the line discipline write_wakeup() method. Replace with tty_wakeup(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21staging: dgnc: dgnc_cls.c: Replaced udelay by usleep_rangeJitendra Kumar Khasdev1-1/+1
This patch is to file dgnc_cls.c that fixes up udelay function by usleep_range. It is safe to use according to the following documentation Documentation/timers/timers-howto.txt. So that is why I have given an appropriate time range. Signed-off-by: Jitendra Kumar Khasdev <jkhasdev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21Staging: dgnc: dgnc_tty: Typo error dgnc_wmove commentNizam Haider1-1/+1
Fix Typo errror in the comment section of dgnc_wmove Signed-off-by: Nizam Haider <nijamh@cdac.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statementNizam Haider1-2/+2
Fix Checlpatch warning HECK: braces {} should be used on all arms of this statement Signed-off-by: Nizam Haider <nijamh@cdac.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21driver:staging:dgnc Fix spaces preferred around that ...Bogicevic Sasa1-3/+3
This fixes all "spaces preferred around that ..." messages from checkpatch.pl Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15Staging: dgnc: Remove unused #include header fileShraddha Barke1-1/+0
Since the things defined by digi.h are not used in dgnc_utils.c, remove the header from this file. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: dgnc: dgnc_driver: Remove useless initialisationAmitoj Kaur Chawla1-1/+1
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: dgnc: dgnc_tty: Remove useless initialisationAmitoj Kaur Chawla1-1/+1
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: dgnc: Fix lines over 80 charactersCristina Moraru1-18/+40
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-16staging/dgnc: fix info leak in ioctlSalva Peiró1-0/+1
The dgnc_mgmt_ioctl() code fails to initialize the 16 _reserved bytes of struct digi_dinfo after the ->dinfo_nboards member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Salva Peiró <speirofr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: dgnc: simplify a trivial if-return sequenceParshuram Thombare1-4/+1
Signed-off-by: Parshuram Thombare <thombarepr@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: dgnc: remove parenthesisSudip Mukherjee3-32/+32
checkpatch was warning us about extra unneeded parenthesis. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: dgnc: alignment styleSudip Mukherjee4-22/+22
checkpatch was warning us that the alignment should match the open parenthesis. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: dgnc: remove space after castSudip Mukherjee5-27/+27
Space is not necessary after typecast. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: dgnc: remove blankline after braceSudip Mukherjee5-30/+0
Blank lines are not needed after opening braces. checkpatch was giving us warnings about this. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: dgnc: remove blankline before braceSudip Mukherjee6-16/+0
Blank lines are not needed before closing braces. checkpatch was giving warning about this. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: dgnc: remove multiple blank linesSudip Mukherjee5-140/+0
checkpatch warns us about multiple blank lines which are not needed. Remove them. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: dgnc: take a lock when storing value in dgnc_poll_tickSalah Triki3-2/+10
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-04staging: dgnc: remove dgnc_init_globals functionSudip Mukherjee1-16/+2
The dgnc_init_globals() function is only initializing the timer so initialize it directly and remove dgnc_init_globals() and change the comment appropriately. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: dgnc: remove initialization of globalSudip Mukherjee1-7/+0
globals variable will be initialied to 0 and the global pointers will be to NULL. No need to initialize them separately. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: dgnc: remove NULL testSudip Mukherjee1-2/+1
This NULL test is not required as iounmap will validate the argument. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: dgnc: change style of NULL comparisonSudip Mukherjee1-3/+3
Change the NULL comparison style as warned by checkpatch. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: dgnc: remove unused variablesSudip Mukherjee2-12/+3
These variables were only assigned some values but were never used. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: dgnc: Fix line over 80 characters warningCristina Moraru1-58/+128
Fix 'line over 80 characters' checkpatch warning Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging: dgnc: Fix indentation warningCristina Moraru1-6/+6
Fixed 'suspect code indent for conditional statements (8, 24)' Warning Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: dgnc: Fixed line over 80 characters longAnjali Menon1-1/+2
This is a patch that fixes line over 80 characters coding style warning detected by checkpatch.pl. WARNING: line over 80 characters Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: dgnc: Remove unnecessary externsJoe Perches1-8/+8
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31Staging: dgnc: dgnc_driver.h: remove unnecessary commentsNavy Cheng1-3/+3
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-06-18staging: dgnc: free memory allocatedHari Prasath Gujulan Elango1-0/+4
The memory allocated in dgnc_tty_register() for two objects is not freed anywhere.This patch addresses this by freeing the memory in dgnc_tty_uninit. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18staging: dgnc: fix typo in comments secionHari Prasath Gujulan Elango1-1/+1
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-08staging: dgnc: remove ununsed MacroHari Prasath Gujulan Elango1-1/+0
Remove the ununsed Macro Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: dgnc: delete all references to 'flipbuf'Gujulan Elango, Hari Prasath (H.)2-12/+0
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-31staging: dgnc: fix line length over 80 chars in dgnc_sysfs.cWim de With1-36/+74
This patch fixes most of the lines over 80 characters long in dgnc_sysfs.c. I couldn't find a way to break line 202-207 in a sensible way. If there is a way, let me know. Signed-off-by: Wim de With <nauxuron@wimdewith.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31Staging: dgnc: fixed coding style issue in digi.hBuţiu Alexandru Octavian1-7/+7
Fixed coding style issue "warning line over 80 characters" detected by checkpatch.pl in digi.h Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: dgnc: remove redundant checkGiedrius Statkevičius1-6/+0
count doesn't get changed in between identical checks in dgnc_tty_write() so remove the second check Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: dgnc: remove dead code in dgnc_tty_write()Giedrius Statkevičius1-44/+1
Remove the dead code protected by in_user in dgnc_tty_write() because it is set to 0 and never changed to 1 thus the code in ifs never gets executed. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: dgnc: remove redundant !ch checksGiedrius Statkevičius2-4/+2
Remove checks that are redundant since we don't have boards with partially initialized ->channels[i]. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: dgnc: don't forget to check if ->channels[i] is NULL in dgnc_tty_uninit()Giedrius Statkevičius1-2/+6
Add a check if ->channels[i] is NULL because a NULL pointer may be dereferenced in case one of the allocations failed Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>