hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/input/touchscreen/tp_suspend.h
....@@ -34,28 +34,26 @@
3434
3535 tp = container_of(self, struct tp_device, fb_notif);
3636
37
- //printk("%s.....lin=%d tp->status=%x,blank_mode=%x\n",__func__,__LINE__,tp->status,blank_mode);
37
+ if (action != FB_EVENT_BLANK)
38
+ return NOTIFY_DONE;
3839
3940 mutex_lock(&tp->ops_lock);
4041
41
- switch (action) {
42
- case FB_EARLY_EVENT_BLANK:
43
- blank_mode = *((int *)event->data);
44
- if (blank_mode != FB_BLANK_UNBLANK && tp->status == FB_BLANK_UNBLANK) {
45
- tp->status = blank_mode;
46
- ret = tp->tp_suspend(tp);
47
- }
48
- break;
42
+ blank_mode = *((int *)event->data);
43
+ //printk("%s.....lin=%d tp->status=%x,blank_mode=%x\n",__func__,__LINE__,tp->status,blank_mode);
4944
50
- case FB_EVENT_BLANK:
51
- blank_mode = *((int *)event->data);
52
- if (blank_mode == FB_BLANK_UNBLANK && tp->status != FB_BLANK_UNBLANK) {
45
+ switch (blank_mode) {
46
+ case FB_BLANK_UNBLANK:
47
+ if (tp->status != FB_BLANK_UNBLANK) {
5348 tp->status = blank_mode;
5449 tp->tp_resume(tp);
5550 }
5651 break;
57
-
5852 default:
53
+ if (tp->status == FB_BLANK_UNBLANK) {
54
+ tp->status = blank_mode;
55
+ ret = tp->tp_suspend(tp);
56
+ }
5957 break;
6058 }
6159