#
3e39104b |
|
12-Dec-2023 |
ye xingchen <ye.xingchen@zte.com.cn> |
Input: ims-pcu - use sysfs_emit() instead of scnprintf() Replace calls to scnprintf() in the methods showing device attributes with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202212011548387254492@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
c85c3679 |
|
28-Sep-2022 |
Colin Ian King <colin.i.king@gmail.com> |
Input: ims-pcu - fix spelling mistake "BOOLTLOADER" -> "BOOTLOADER" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220928211003.61872-1-colin.i.king@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
f519f78c |
|
19-Jun-2021 |
YueHaibing <yuehaibing@huawei.com> |
Input: ims-pcu - use kobj_to_dev() Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20210607122533.10608-1-yuehaibing@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
94a332bd |
|
28-Apr-2021 |
Shubhankar Kuranagatti <shubhankarvk@gmail.com> |
Input: ims-pcu - replace some spaces with tabs Unnecessary spaces have been replaced with tab space. This is done to maintain code uniformity. Signed-off-by: Shubhankar Kuranagatti <shubhankarvk@gmail.com> Link: https://lore.kernel.org/r/20210428091050.ryr7kxlxre7uhye4@kewl-virtual-machine Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
bfae2779 |
|
19-Mar-2021 |
Johan Hovold <johan@kernel.org> |
Input: ims-pcu - drop redundant driver-data assignment The driver data for the data interface has already been set by usb_driver_claim_interface() so drop the subsequent redundant assignment. Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210318155525.22496-1-johan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
d431b9e6 |
|
06-Aug-2020 |
Colin Ian King <colin.king@canonical.com> |
Input: ims-pcu - return error code rather than -ENOMEM Currently the assignment of -ENOMEM to error is redundant because error is not being read and -ENOMEM is being hard coded as an error return. Fix this by returning the error code in variable 'error'; this also allows the error code from a failed call to input_register_device to be preserved and returned to the caller rather than just returning a possibly inappropriate -ENOMEM. Kudos to Dan Carpenter for the suggestion of an improved fix. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200603152151.139337-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
d2912cb1 |
|
04-Jun-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
6b65189a |
|
05-Feb-2019 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: ims-pcu - switch to using brightness_set_blocking() Now that LEDs core allows "blocking" flavor of "set brightness" method we can use it and get rid of private work item. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
5ddc3c65 |
|
25-Nov-2017 |
Zhen Lei <thunder.leizhen@huawei.com> |
Input: ims-pcu - fix typo in the error message 1. change "to" to "too". 2. move ")" to the front of "\n", which discovered by Joe Perches. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Reviewed-by: Joe Perches <joe@perches.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
ea04efee |
|
07-Oct-2017 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: ims-psu - check if CDC union descriptor is sane Before trying to use CDC union descriptor, try to validate whether that it is sane by checking that intf->altsetting->extra is big enough and that descriptor bLength is not too big and not too small. Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
b06ae148 |
|
10-Jul-2017 |
Arvind Yadav <arvind.yadav.cs@gmail.com> |
Input: ims-pcu - constify attribute_group structures attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 13547 1600 0 15147 3b2b drivers/input/misc/ims-pcu.o File size After adding 'const': text data bss dec hex filename 13675 1472 0 15147 3b2b drivers/input/misc/ims-pcu.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
1916d319 |
|
16-Mar-2017 |
Johan Hovold <johan@kernel.org> |
Input: ims-pcu - validate number of endpoints before using them Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack control-interface endpoints. Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver") Signed-off-by: Johan Hovold <johan@kernel.org> Cc: stable@vger.kernel.org # 3.10 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
a0ad220c |
|
17-Mar-2016 |
Oliver Neukum <oneukum@suse.com> |
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
939ffb17 |
|
03-Dec-2014 |
Aniroop Mathur <aniroop.mathur@gmail.com> |
Input: initialize device counter variables with -1 Let's initialize atomic_t variables keeping track of number of various devices created so far with -1 in order to avoid extra subtraction operation. Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
60183a6e |
|
24-Oct-2014 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store() Coverity pointed out that at return point error is always 0 so the conditional is not needed. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
19318de1 |
|
18-May-2014 |
Christian Engelmayer <cengelma@gmx.at> |
Input: ims-pcu - fix uninitialized use of 'error' in ims_pcu_buffers_alloc() In case allocation via usb_alloc_coherent() fails in ims_pcu_buffers_alloc(), the function jumps to the exit path without initializing local variable 'error' that is used as return value. Detected by Coverity - CID 1016531. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
e5fcd269 |
|
12-Feb-2014 |
Andrey Smirnov <andrew.smirnov@gmail.com> |
Input: ims-pcu - add commands supported by the new version of the FW New version of the PCU firmware supports two new commands: - IMS_PCU_CMD_OFN_SET_CONFIG which allows to write data to the registers of one finger navigation(OFN) chip present on the device - IMS_PCU_CMD_OFN_GET_CONFIG which allows to read data form the registers of said chip. This commit adds two helper functions to use those commands and sysfs attributes to use them. It also exposes some OFN configuration parameters via sysfs. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
ad7647d9 |
|
03-Jan-2014 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: ims-pcu - fix error unwinding path in application mode We first create backlight and then input devices so we should destroy them in opposite order when handling errors. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
3c2b9010 |
|
01-Apr-2013 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: ims-pcu - fix a memory leak on error Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
#
628329d5 |
|
02-Feb-2013 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: add IMS Passenger Control Unit driver The PCU is a device installed in the armrest of a plane seat and is connected to IMS Rave Entertainment System. It has a set of control buttons (Volume Up/Down, Attendant, Lights, etc) on one side and gamepad-like controls on the other side. Originally the device was handled from userspace and because of that it presents itself on USB bus as a CDC-ACM modem device that however can not make calls. However the custom handling is not as convenient as using standard input subsystem facilities. If it was pure input device it would be possible to continue using userspace solution (moving it over to uinput), but the device also has backlighted keys which can not be supported via uinput. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|