summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc/dgnc_mgmt.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: dgnc: fix CamelCase in dgnc_driver.cDaeseok Youn2016-03-281-14/+14
| | | | | | | fix checkpatch.pl warning about CamelCase. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: delete parentheses around right hand side of assignmentEva Rachel Retuya2016-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* staging/dgnc: fix info leak in ioctlSalva Peiró2015-10-161-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>
* staging: dgnc: remove space after castSudip Mukherjee2015-10-121-3/+3
| | | | | | | Space is not necessary after typecast. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove blankline after braceSudip Mukherjee2015-10-121-1/+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>
* staging: dgnc: remove blankline before braceSudip Mukherjee2015-10-121-1/+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>
* staging: dgnc: remove multiple blank linesSudip Mukherjee2015-10-121-5/+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>
* staging: dgnc: Fixed line over 80 characters longAnjali Menon2015-09-141-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>
* dgnc: remove old 2.4-2.6 compat kernel definesGiedrius Statkevičius2015-03-241-1/+0
| | | | | | | | | | 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>
* dgnc: get rid of dpacompat.h, move remaining stuff to digi.hGiedrius Statkevičius2015-03-241-1/+0
| | | | | | | | | 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>
* staging: dgnc: some off by one bugsDan Carpenter2015-03-241-2/+2
| | | | | | | | | | | | | | | | "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>
* dgnc: clean up comments at start of filesGiedrius Statkevičius2015-03-121-16/+0
| | | | | | | | | | | | | 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>
* staging: dgnc: off by one in dgnc_mgmt_ioctl()Dan Carpenter2015-03-121-2/+1
| | | | | | | | | | "dgnc_NumBoards" is the number of initialized elements in the dgnc_Board[] array so the comparison should be ">=" instead of ">" so we don't read invalid data. We can remove the special handling of the empty array now that we've fixed this bug. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Fix do not add new typedefsEbru Akagunduz2014-10-021-1/+1
| | | | | | | | 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>
* staging: dgnc: dgnc_mgmt.c: Replace non-standard spinlock's macrosRoberta Dobrescu2014-09-281-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces non-standard spinlock's macros. It is done using coccinelle and the following semantic patch: @@ expression x; @@ - DGNC_SPINLOCK_INIT(x) + spin_lock_init(&x) @@ expression x, y; @@ - DGNC_LOCK(x, y) + spin_lock_irqsave(&x, y) @@ expression x, y; @@ - DGNC_UNLOCK(x, y) + spin_unlock_irqrestore(&x, y) @used_by_lock exists@ typedef ulong; symbol lock_flags; position p1, p2; @@ ( ulong lock_flags@p1; | unsigned long lock_flags@p2; ) ... ( spin_lock_irqsave(..., lock_flags) | spin_unlock_irqrestore(..., lock_flags) ) @@ position used_by_lock.p1, used_by_lock.p2; @@ ( - ulong lock_flags@p1; + unsigned long flags; | - unsigned long lock_flags@p2; + unsigned long flags; ) <... - lock_flags + flags ...> Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove DPR Macros and related codes.Seunghun Lee2014-08-301-23/+0
| | | | | | | | | | | 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>
* Staging: dgnc: fix indentation in dgnc_mgmt.cIulia Manda2014-03-131-3/+6
| | | | | | | | Align test parts in if statement on separate lines. Signed-off-by: Iulia Manda <iulia.manda21@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
* Staging:dgnc: Fixed space prohibited between function name and '('Iulia Manda2014-03-101-2/+2
| | | | | | | | Deleted space between sizeof and open parenthethis. Signed-off-by: Iulia Manda <iulia.manda21@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
* Staging:dgnc: Use uaccess.h header from linux dir instead of asmIulia Manda2014-03-101-1/+1
| | | | | | | Include <linux/uaccess.h> instead of <asm/uaccess.h> Signed-off-by: Iulia Manda <iulia.manda21@gmail.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
* Stagind:dgnc: Fixed unnecessary braces for single statement blocksIulia Manda2014-03-101-6/+3
| | | | | | | | Deleted unnecessary braces for single statement if blocks. Signed-off-by: Iulia Manda <iulia.manda21@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
* Staging:dgnc: Fixed else not following close brace errorIulia Manda2014-03-101-2/+1
| | | | | | | | Fix checkpatch.pl warning - else should follow close brace. Signed-off-by: Iulia Manda <iulia.manda21@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
* Staging: dgnc: removing the comparison 'board<0'Ashvini Varatharaj2013-10-191-1/+1
| | | | | | | | Fix dgnc_mgmt_ioctl() warn: unsigned 'board' is never less than zero. Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: changes arguments in sizeofLidza Louina2013-10-051-1/+1
| | | | | | | | | | | | | The arguments that were passed into sizeof were generic. This patch changes this by putting the actual item that we need a size of instead. For example: - kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); + kzalloc(sizeof(*brd), GFP_KERNEL); Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: removes parentheses around return statementsLidza Louina2013-09-171-11/+11
| | | | | | | | This patch removes parentheses around return statements. They aren't needed. Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: removes CVS code from filesLidza Louina2013-08-211-1/+0
| | | | | | | | This patch removes the code supporting CVS from its files. Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: mgmt.c: removes trailing whitespaceLidza Louina2013-08-211-19/+19
| | | | | | | | This patch removes trailing whitespace in the dgnc_mgmt.c file. Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: removes ifdef HAVE_UNLOCKED_IOCTL conditionalsLidza Louina2013-08-201-6/+1
| | | | | | | | | This patch removes the HAVE_UNLOCKED_IOCTL conditional statements from driver.c, mgmt.c and mgmt.h. This was used to support older kernels. It isn't needed now. Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: removes proc codeLidza Louina2013-08-151-1/+0
| | | | | | | | | | | | This patch removes the dgnc_proc.c and dgnc_proc.h files and all references to proc functions in dgnc_driver.c. This also removes proc.h from the include headers in driver.c, mgmt.c and sysfs.c and proc.o from the Makefile. Drivers now use sysfs instead of proc. Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Remove version.h header inclusion in dgnc_mgmt.cSachin Kamat2013-08-031-1/+0
| | | | | | | | version.h header inclusion is not necessary as detected by versioncheck. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: add dgnc digi driverLidza Louina2013-08-021-0/+313
This patch adds the DGNC driver. This is a TTY Serial Port Driver for the Digi International Neo and Classic PCI based product line by Digi International <http://www.digi.com>. This driver isn't hooked up to the build system because it doesn't build, it merely adds the driver written by Digi to the kernel tree so that it can be cleaned up and fixed up properly over time. Cc: Mark Hounschell <markh@compro.net> Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud