aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2015-05-08staging: dgnc: clean up allocation of ->channels[i]Giedrius Statkevičius1-16/+15
Check if kzalloc fails in dgnc_tty_init() and if it does then free all previously allocated ->channels[i] and set them to NULL. This makes the code less error/bug prone because instead of needing programmers attention to add checks everywhere we do that in one place. Also, remove a bogus comment and check in the same loop because ->channels[i] isn't allocated anywhere else. Finally, remove a unnecessary check if ->channels[i] is NULL in the next loop because it can't be. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: dgnc: remove some dead code from dgnc_tty.cGiedrius Statkevičius1-16/+0
Remove some dead code that will never be executed or which serves no purpose Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia2-4/+4
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01staging: dgnc_sysfs: Replace printk(KERN_ERR ) with pr_err()Ioana Ciornei1-1/+1
Fix the following checkpatch warning: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: Clean up dgnc_sysfs.hGiedrius Statkevičius1-4/+1
Remove redundant blank lines, move absolute include after relative include. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: remove unused stuff from dgnc_cls.hGiedrius Statkevičius1-13/+0
Remove unused defines from dgnc_cls.h Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: remove old 2.4-2.6 compat kernel definesGiedrius Statkevičius4-42/+1
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-24dgnc: use linux/types.h instead of dgnc_types.hGiedrius Statkevičius5-39/+7
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-24dgnc: get rid of dpacompat.h, move remaining stuff to digi.hGiedrius Statkevičius5-112/+36
Dpacompat.h contained a lot of unused #defines and only few things are used from it so since we've trimmed down digi.h, now we can delete dpacompat.h and move remaining stuff into digi.h. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: clean up digi.hGiedrius Statkevičius1-267/+0
Remove a lot of unused structs and defines from digi.h. We still have to be careful with TIOCM_LE and TIOCMSET/TIOCMBIC because termios.h and ioctls.h respectfully redefine them. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: remove unused dgnc_ioctl_name() commandGiedrius Statkevičius2-53/+0
dgnc_ioctl_name() is never used anywhere so remove it Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: dgnc: some off by one bugsDan Carpenter4-7/+7
"dgnc_NumBoards" is the number of filled out elements in the dgnc_Board[] array. "->nasync" and "->maxports" are the same value. They are the number of channels in the ->channels[] array so these tests should be ">=" instead of ">" so we avoid reading past the end of the arrays. I cleaned up the conditions in dgnc_mgmt_ioctl() a bit. There was a work around for the off by one bug in the case where there were no boards which is no longer needed. "channel" is unsigned so it can't be negative. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18Staging: dgnc: release the lock before testing for nullityQuentin Lambert1-1/+1
The refactoring intrduced in c84a083b995b ("Staging: dgnc: Use goto for spinlock release before return") inverts the order in which the lock is released and ld is tested for nullity. This patch restores the execution flow. Fixes: c84a083b995b ("Staging: dgnc: Use goto for spinlock release before return") Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>