| .. | .. |
|---|
| 34 | 34 | |
|---|
| 35 | 35 | tp = container_of(self, struct tp_device, fb_notif); |
|---|
| 36 | 36 | |
|---|
| 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; |
|---|
| 38 | 39 | |
|---|
| 39 | 40 | mutex_lock(&tp->ops_lock); |
|---|
| 40 | 41 | |
|---|
| 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); |
|---|
| 49 | 44 | |
|---|
| 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) { |
|---|
| 53 | 48 | tp->status = blank_mode; |
|---|
| 54 | 49 | tp->tp_resume(tp); |
|---|
| 55 | 50 | } |
|---|
| 56 | 51 | break; |
|---|
| 57 | | - |
|---|
| 58 | 52 | default: |
|---|
| 53 | + if (tp->status == FB_BLANK_UNBLANK) { |
|---|
| 54 | + tp->status = blank_mode; |
|---|
| 55 | + ret = tp->tp_suspend(tp); |
|---|
| 56 | + } |
|---|
| 59 | 57 | break; |
|---|
| 60 | 58 | } |
|---|
| 61 | 59 | |
|---|