Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271329
b: refs/heads/master
c: 8b53b7f
h: refs/heads/master
i:
  271327: 31e0726
v: v3
  • Loading branch information
Wolfram Stering authored and Florian Tobias Schandinat committed Oct 3, 2011
1 parent cbf00d2 commit aee8545
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8798ccbefc0e4ef7438c080b7ba0410738c8cfa
refs/heads/master: 8b53b7fb57e1ce3441b1a32f8374874b53c4bc31
13 changes: 13 additions & 0 deletions trunk/drivers/video/mx3fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ static void sdc_disable_channel(struct mx3fb_info *mx3_fbi)
uint32_t enabled;
unsigned long flags;

if (mx3_fbi->txd == NULL)
return;

spin_lock_irqsave(&mx3fb->lock, flags);

enabled = sdc_fb_uninit(mx3_fbi);
Expand Down Expand Up @@ -986,9 +989,19 @@ static void __blank(int blank, struct fb_info *fbi)
{
struct mx3fb_info *mx3_fbi = fbi->par;
struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
int was_blank = mx3_fbi->blank;

mx3_fbi->blank = blank;

/* Attention!
* Do not call sdc_disable_channel() for a channel that is disabled
* already! This will result in a kernel NULL pointer dereference
* (mx3_fbi->txd is NULL). Hide the fact, that all blank modes are
* handled equally by this driver.
*/
if (blank > FB_BLANK_UNBLANK && was_blank > FB_BLANK_UNBLANK)
return;

switch (blank) {
case FB_BLANK_POWERDOWN:
case FB_BLANK_VSYNC_SUSPEND:
Expand Down

0 comments on commit aee8545

Please sign in to comment.