summaryrefslogtreecommitdiff
path: root/drivers/staging/nvec
AgeCommit message (Collapse)AuthorFilesLines
2024-02-19staging/nvec: update TODOMarc Dietrich1-4/+3
replace old/implemented items with new todo list Signed-off-by: Marc Dietrich <marvin24@gmx.de> Link: https://lore.kernel.org/r/20240218212557.22836-2-marvin24@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-19staging/nvec: update comment regarding udelay in the isrMarc Dietrich1-3/+4
Update the comment before the udelay on how to replace it. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Link: https://lore.kernel.org/r/20240218212557.22836-1-marvin24@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-03staging: nvec_ps2: Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230403154014.2564054-22-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-03staging: nvec_power: Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230403154014.2564054-21-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-03staging: nvec: nvec_kbd: Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230403154014.2564054-20-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-03staging: nvec: Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230403154014.2564054-19-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22Staging: nvec: Remove macro definition to_nvec_ledSumitra Sharma1-4/+1
Remove definition 'to_nvec_led' because it is only used once. Rewrite the code directly in the calling function 'nvec_led_brightness_set'. Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com> Link: https://lore.kernel.org/r/20230322054051.GA150453@sumitra.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08Staging: nvec: Fix ending in '(' errorAyan Choudhary1-2/+2
This patch fixes the checkpatch.pl warning: CHECK: Lines should not end with a '(' 386: FILE: drivers/staging/nvec/nvec.c:386: + err = wait_for_completion_interruptible_timeout( Signed-off-by: Ayan Choudhary <ayanchoudhary1025@gmail.com> Link: https://lore.kernel.org/r/20220207133921.4287-1-ayanchoudhary1025@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: nvec: Fix a bunch of kernel-doc issuesLee Jones1-3/+4
Fixes the following W=1 kernel build warning(s): drivers/staging/nvec/nvec.c:109: warning: Function parameter or member 'events' not described in 'nvec_register_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'nb' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'event_type' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'data' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:358: warning: Function parameter or member 'ev' not described in 'nvec_event_mask' drivers/staging/nvec/nvec.c:358: warning: Function parameter or member 'mask' not described in 'nvec_event_mask' Cc: Marc Dietrich <marvin24@gmx.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Kernel Team <ac100@lists.lauchpad.net> Cc: Pierre-Hugues Husson <phhusson@free.fr> Cc: Ilya Petrov <ilya.muromec@gmail.com> Cc: Andres Klode <jak@jak-linux.org> Cc: ac100@lists.launchpad.net Cc: linux-tegra@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210414181129.1628598-23-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-22staging/nvec:: avoid Wempty-body warningArnd Bergmann1-1/+1
This driver has a few disabled diagnostics, which can probably just get removed, or might still be helpful: drivers/staging/nvec/nvec_ps2.c: In function 'nvec_ps2_notifier': drivers/staging/nvec/nvec_ps2.c:94:77: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 94 | NVEC_PHD("unhandled mouse event: ", msg, msg[1] + 2); Changing the empty macro to the usual 'do {} while (0)' at least shuts up the compiler warnings. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210322103545.704121-2-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-12staging: nvec: minor coding style fixFatih Yildirim1-1/+1
Fix for the below coding style warning. Warning: Move const after static - use 'static const int' Signed-off-by: Fatih Yildirim <yildirim.fatih@gmail.com> Link: https://lore.kernel.org/r/20210212073423.20562-1-yildirim.fatih@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-04staging: nvec: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi1-2/+2
strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210131172838.146706-6-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01Staging: nvec: Removes repeated word typo in commentRyan Kosta1-1/+1
Fix a comment typo. Signed-off-by: Ryan Kosta <ryanpkosta@gmail.com> Link: https://lore.kernel.org/r/20200927172855.9813-1-ryanpkosta@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-10Staging: nvec: Replace HTTP links with HTTPS onesAlexander A. Klimov1-1/+1
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Link: https://lore.kernel.org/r/20200708183117.16563-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-19staging: nvec: check return valueXidong Wang1-0/+2
In nvec_kbd_probe(), the return value of devm_input_allocate_device() should be checked before it is used. Signed-off-by: Xidong Wang <wangxidong_97@163.com> Link: https://lore.kernel.org/r/1576648598-12257-1-git-send-email-wangxidong_97@163.com Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20staging: nvec: Fix Kconfig indentationKrzysztof Kozlowski1-5/+5
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20191120133858.13369-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-12staging: nvec: make use of devm_platform_ioremap_resourceHariprasad Kelam1-3/+1
fix below issue reported by coccicheck drivers/staging//nvec/nvec.c:794:1-5: WARNING: Use devm_platform_ioremap_resource for base Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Link: https://lore.kernel.org/r/1567935662-8006-1-git-send-email-hariprasad.kelam@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: Remove dev_err() usage after platform_get_irq()Stephen Boyd1-3/+1
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Signed-off-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20190730181557.90391-43-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23Revert "staging: nvec: Augment TODO file with GPIO work item"Marc Dietrich1-5/+0
This reverts commit 5a3e59ce3acf2f52c8b4a6fc656c3b1e4a329f06, because the necessary changes were applied in the "staging: nvec: convert to use GPIO descriptors" patch. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: nvec: convert to use GPIO descriptorsMarc Dietrich2-33/+11
Use GPIO descriptors instead of relying on the old method. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: nvec: cleanup use of dev in probe functionMarc Dietrich1-17/+18
This cleanups the probe function a bit by using a dev variable instead of &pdev-dev. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: nvec: simplify getting .drvdataWolfram Sang1-4/+2
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: nvec: Augment TODO file with GPIO work itemLinus Walleij1-0/+5
To make sure that this driver does not leave staging before it is properly converted to use the new GPIO descriptor API, augment the TODO file with this work item. Cc: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: nvec: remove redundant license textGreg Kroah-Hartman7-43/+0
Now that the SPDX tag is in all drivers/staging/nvec/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: nvec: add SPDX identifier.Greg Kroah-Hartman7-0/+7
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the staging nvec driver to have a proper SPDX identifiers, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: nvec: explicitly request exclusive reset controlPhilipp Zabel1-1/+1
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Marc Dietrich <marvin24@gmx.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-tegra@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08Staging: nvec: Remove FSF's mailing addressRiku Salminen1-2/+1
Removed Free Software Foundation's address from the copyright notice and replaced it with a link to http://www.gnu.org/licenses Signed-off-by: Riku Salminen <riku@laatikko.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: nvec: Remove unnecessary cast on void pointersimran singhal1-1/+1
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-14staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over ↵Arushi Singhal1-1/+1
kzalloc(sizeof(struct serio)...) Prefer kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...) as reported by checkpatch.pl. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-14staging: nvec: Fix incorrect type of i2c addressFranck Demathieu1-1/+1
The i2c address is unsigned according to the dt-bindings. Fix sparse issue (-Wtypesign): drivers/staging/nvec/nvec.c:781:35: warning: incorrect type in argument 3 (different signedness) drivers/staging/nvec/nvec.c:781:35: expected unsigned int [usertype] *out_value drivers/staging/nvec/nvec.c:781:35: got int *<noident> Signed-off-by: Franck Demathieu <fdemathieu@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: nvec: fix indent issue in nvec_power.cMatthew Smith1-1/+1
Fixes "WARNING: Statements should start on a tabstop" from checkpatch.pl Signed-off-by: Matthew Smith <matthew11235@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07staging: nvec: remove managed resource from PS2 driverMarc Dietrich1-1/+1
This basicly reverts commit e534f3e9 (staging:nvec: Introduce the use of the managed version of kzalloc). Serio struct should never by managed because it is refcounted. Doing so will lead to a double free oops on module remove. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Fixes: e534f3e9429f ("staging:nvec: Introduce the use of the managed version of kzalloc") Cc: stable <stable@vger.kernel.org> # 3.15+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07Revert "staging: nvec: ps2: change serio type to passthrough"Paul Fertser1-1/+1
This reverts commit 36b30d6138f4677514aca35ab76c20c1604baaad. This is necessary to detect paz00 (ac100) touchpad properly as one speaking ETPS/2 protocol. Without it X.org's synaptics driver doesn't work as the touchpad is detected as an ImPS/2 mouse instead. Commit ec6184b1c717b8768122e25fe6d312f609cc1bb4 changed the way auto-detection is performed on ports marked as pass through and made the issue apparent. A pass through port is an additional PS/2 port used to connect a slave device to a master device that is using PS/2 to communicate with the host (so slave's PS/2 communication is tunneled over master's PS/2 link). "Synaptics PS/2 TouchPad Interfacing Guide" describes such a setup (PS/2 PASS-THROUGH OPTION section). Since paz00's embedded controller is not connected to a PS/2 port itself, the PS/2 interface it exposes is not a pass-through one. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Fixes: 36b30d6138f4 ("staging: nvec: ps2: change serio type to passthrough") Cc: stable <stable@vger.kernel.org> # 3.4+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07drivers: staging: nvec: remove bogus reset command for PS/2 interfacePaul Fertser1-4/+0
This command was sent behind serio's back and the answer to it was confusing atkbd probe function which lead to the elantech touchpad getting detected as a keyboard. To prevent this from happening just let every party do its part of the job. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Cc: stable <stable@vger.kernel.org> # 3.4+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: nvec: removes a useless cast on a void pointerBen Marsh1-2/+2
Remove an unnecessary cast on a void pointer in nvec_power.c Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: nvec: Fix comparison to NULLLaura Garcia Liebana1-2/+2
Replace the use of comparison to NULL, use !<expression> instead. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: nvec: Remove space after a castLaura Garcia Liebana1-3/+4
No space is required after a cast. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12Staging: nvec: removes an unnecessary cast on a void pointerBen Marsh1-1/+1
Patch to nvec_ps2.c to remove an unnecessary cast on a void pointer. Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: nvec: nvec.c: Drop void pointer castJanani Ravichandran1-1/+1
Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: nvec: Avoid the use of BUG_ONLaura Garcia Liebana1-2/+0
Prevent a kernel panic by avoiding the use of the BUG_ON macro. Checkpatch detected this issue. The BUG_ON macro is not needed as such cases shouldn't happen and they were introduced for debugging purposes. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: nvec: Remove blank lines before a close braceLaura Garcia Liebana1-1/+0
Blank lines aren't necessary before a close brace '}'. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-21staging: nvec: Fix alignment with the open parenthesisLaura Garcia Liebana1-16/+19
Alignment should match open parenthesis. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-21staging: nvec: Use the BIT macroLaura Garcia Liebana1-9/+9
Prefer using the BIT macro instead of (1 << X). Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15Staging: nvec: Modify the nvec_write_sync method to return the error codeTomás Tormo3-19/+22
Modify the nvec_write_sync function to return the error code instead of the received message. The received message is now returned as an output parameter. Signed-off-by: Tomás Tormo <tomas.tormo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-10staging: nvec: Remove unneeded commentJanani Ravichandran1-2/+0
Remove this comment as it does not have a meaning here. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: nvec: replace led_classdev_registerHari Prasath Gujulan Elango1-11/+1
Replace the led_classdev_register() with the platform managed version devm_led_classdev_register() & henceforth remove the redundant nvec_paz00_remove() function. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: nvec: fix block commentsSimon Guinot2-7/+13
This patch fixes a couple of checkpatch warnings about block comments. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-16staging: nvec: Add space around '<<'Burcin Akalin1-9/+9
Add space around operator '<<'. Problem found using checkpatch.pl CHECK: spaces preferred around that '<<' (ctx:VxV) Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>