projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d04ddb
)
Input: logips2pp - ignore mice reporting model as 0
author
Dmitry Torokhov
<dtor@insightbb.com>
Thu, 12 Apr 2007 05:32:22 +0000
(
01:32
-0400)
committer
Dmitry Torokhov
<dtor@insightbb.com>
Thu, 12 Apr 2007 05:32:22 +0000
(
01:32
-0400)
There are mice reporting to logitech's queries with model
of 0. Do not claim that these are Logitech mice.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/mouse/logips2pp.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/input/mouse/logips2pp.c
b/drivers/input/mouse/logips2pp.c
index d3ddea26b8ca65fec6f714032425d50e801bda3a..74a8ba7c71f852468122ea2ef2d6ca347ff26583 100644
(file)
--- a/
drivers/input/mouse/logips2pp.c
+++ b/
drivers/input/mouse/logips2pp.c
@@
-338,12
+338,12
@@
int ps2pp_init(struct psmouse *psmouse, int set_properties)
param[1] = 0;
ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
- if (!param[1])
- return -1;
-
model = ((param[0] >> 4) & 0x07) | ((param[0] << 3) & 0x78);
buttons = param[1];
+ if (!model || !buttons)
+ return -1;
+
if ((model_info = get_model_info(model)) != NULL) {
/*