summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc/dgnc_sysfs.c
Commit message (Collapse)AuthorAgeFilesLines
* Staging: dgnc: constify attribute_group structuresBhumika Goyal2016-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for attribute_group structures that are only passed as a second argument to the functions sysfs_remove_group and sysfs_create_group. As these arguments are constant so, attribute_group structures having this property can also be made constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ ( sysfs_remove_group(e1,&i@p) | sysfs_create_group(e1,&i@p) ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 6248 1024 0 7272 1c68 drivers/staging/dgnc/dgnc_sysfs.o File size after: text data bss dec hex filename 6288 960 0 7248 1c50 drivers/staging/dgnc/dgnc_sysfs.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: dgnc_sysfs *_ATTR() macros convertMatias Mucciolo2016-09-121-93/+90
| | | | | | | | Convert DRIVER_ATTR() macro with DRIVER_ATTR_RO/RW and DEVICE_ATTR() macro with DEVICE_ATTR_RO() Signed-off-by: Matias Mucciolo <mmucciolo@suteba.org.ar> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: fix 'line over 80 characters'Daeseok Youn2016-05-091-9/+11
| | | | | | | fix checkpatch.pl warning about 'line over 80 characters'. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: fix CamelCase in dgnc_driver.cDaeseok Youn2016-03-281-1/+1
| | | | | | | 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: remove parenthesisSudip Mukherjee2015-10-121-24/+24
| | | | | | | 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>
* 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-37/+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: take a lock when storing value in dgnc_poll_tickSalah Triki2015-10-041-1/+8
| | | | | | | | 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>
* staging: dgnc: fix line length over 80 chars in dgnc_sysfs.cWim de With2015-05-311-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>
* staging: dgnc_sysfs: Replace printk(KERN_ERR ) with pr_err()Ioana Ciornei2015-04-011-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>
* 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: Replace printk with dev_errCristina Opriceana2015-03-011-1/+1
| | | | | | | | This patch fixes the following checkpatch.pl warning: WARNING: Prefer [subsystem eg: netdev]_err over printk(KERN_ERR, ...). Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove debug symbolsAya Mahfouz2014-10-281-18/+0
| | | | | | | | This patch removes all of the debug symbols and the variable dgnc_debug since they are not used anywhere in the code. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove unused variable named rawreadokAya Mahfouz2014-10-281-19/+0
| | | | | | | | This patch removes the variable rawreadok since it is only intialized but not used in any of the driver functions. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Fix unnecessary braces warning.Gulsah Kose2014-09-231-4/+2
| | | | | | | | Fixes "braces {} are not necessary for single statement blocks" checkpatch.pl warnings in dgnc_sysfs.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Check sscanf return valueRoberta Dobrescu2014-09-191-3/+15
| | | | | | | | | This fixes the following checkpatch.pl warnings: WARNING: unchecked sscanf return value Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Fix missing blank line warning.Gulsah Kose2014-09-191-0/+1
| | | | | | | | | Fixes "Missing a blank line after declarations" checkpatch.pl warning in dgnc_sysfs.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Remove driver-wide polling counter variableKonrad Zapalowicz2014-08-171-10/+0
| | | | | | | | | | | The polling counter variable is only exposed via sysfs and has no other purpose. Now, since the polling shall be implemented as a board specific feature rather than being global in the driver this counter is obsolete. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Remove driver-wide state variableKonrad Zapalowicz2014-08-171-9/+0
| | | | | | | | | This commit removes the driver's global state variable. This is ok because the state was changed only once at the end of init phase thus the future usage of this variable is pointless. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: DGNC_VERIFY_BOARD macro in do while blockJeremiah Mahler2014-07-131-9/+11
| | | | | | | | | | Enclose the body of the multi-statement DGNC_VERIFY_BOARD macro inside a do - while block as per Documentation/CodingStyle. Fixes 1 error found by checkpatch.pl. Cc: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: use dev_err() instead of printk()Martin Kepplinger2014-05-151-1/+1
| | | | | | | | Use dev_err() insted of printk() in order to provice userspace with more useful information and use the common kernel coding style. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Remove casting the return value which is a void pointerJingoo Han2013-09-261-11/+11
| | | | | | | | | | | Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. CC: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: removes parentheses around return statementsLidza Louina2013-09-171-58/+58
| | | | | | | | 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: renames board_t to dgnc_boardLidza Louina2013-09-171-25/+25
| | | | | | | | This patch renames the struct board_t to dgnc_board. board_t wasn't a good name for it since the _t suffix is for typedefs. Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: sysfs.c: fixes code indent errorLidza Louina2013-08-211-2/+2
| | | | | | | | This patch fixes the error "code indent should use tabs where possible" in dgnc_sysfs.c. 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-3/+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: sysfs.c: removes trailing whitespaceLidza Louina2013-08-211-9/+9
| | | | | | | | This patch removes trailing whitespace in the sysfs.c file. 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_sysfs.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/+761
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