forked from WildPlusKernel/kernel_patches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathksu_input_hook_fix.patch
41 lines (39 loc) · 1.35 KB
/
ksu_input_hook_fix.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- ./drivers/input/input.c.orig 2025-02-16 03:31:49.077786900 -0500
+++ ./drivers/input/input.c 2025-02-16 04:09:39.580641587 -0500
@@ -375,11 +375,6 @@
dev->num_vals = 0;
/*
* Reset the timestamp on flush so we won't end up
-#ifdef CONFIG_KSU
-extern bool ksu_input_hook __read_mostly;
-extern int ksu_handle_input_handle_event(unsigned int *type, unsigned int *code, int *value);
-#endif
-
* with a stale one. Note we only need to reset the
* monolithic one as we use its presence when deciding
* whether to generate a synthetic timestamp.
@@ -390,11 +385,12 @@
input_pass_values(dev, dev->vals, dev->num_vals);
dev->num_vals = 0;
}
+}
+
#ifdef CONFIG_KSU
- if (unlikely(ksu_input_hook))
- ksu_handle_input_handle_event(&type, &code, &value);
+extern bool ksu_input_hook __read_mostly;
+extern int ksu_handle_input_handle_event(unsigned int *type, unsigned int *code, int *value);
#endif
-}
void input_handle_event(struct input_dev *dev,
unsigned int type, unsigned int code, int value)
@@ -404,6 +400,10 @@
lockdep_assert_held(&dev->event_lock);
disposition = input_get_disposition(dev, type, code, &value);
+#ifdef CONFIG_KSU
+ if (unlikely(ksu_input_hook))
+ ksu_handle_input_handle_event(&type, &code, &value);
+#endif
if (disposition != INPUT_IGNORE_EVENT) {
if (type != EV_SYN)
add_input_randomness(type, code, value);