diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-12-04 08:52:14 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-04 08:52:14 +0100 |
| commit | cb9c34e6d090d376b77becaa5d29a65dec7f4272 (patch) | |
| tree | 3678abce20d6825aebe3fec218057d4131e13fd6 /drivers/video/backlight/lcd.c | |
| parent | 470c66239ef0336429b35345f3f615d47341e13b (diff) | |
| parent | 061e41fdb5047b1fb161e89664057835935ca1d2 (diff) | |
Merge commit 'v2.6.28-rc7' into core/locking
Diffstat (limited to 'drivers/video/backlight/lcd.c')
| -rw-r--r-- | drivers/video/backlight/lcd.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 8e1731d3b22..680e57b616c 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -42,10 +42,13 @@ static int fb_notifier_callback(struct notifier_block *self, mutex_lock(&ld->ops_lock); if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { - if (event == FB_EVENT_BLANK) - ld->ops->set_power(ld, *(int *)evdata->data); - else - ld->ops->set_mode(ld, evdata->data); + if (event == FB_EVENT_BLANK) { + if (ld->ops->set_power) + ld->ops->set_power(ld, *(int *)evdata->data); + } else { + if (ld->ops->set_mode) + ld->ops->set_mode(ld, evdata->data); + } } mutex_unlock(&ld->ops_lock); return 0; |
