aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/lcd.c')
-rw-r--r--drivers/video/backlight/lcd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index b6449470106c..0bb13df0fa89 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self,
40 if (!ld->ops) 40 if (!ld->ops)
41 return 0; 41 return 0;
42 42
43 if (!lock_fb_info(evdata->info))
44 return -ENODEV;
43 mutex_lock(&ld->ops_lock); 45 mutex_lock(&ld->ops_lock);
44 if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { 46 if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) {
45 if (event == FB_EVENT_BLANK) { 47 if (event == FB_EVENT_BLANK) {
@@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self,
51 } 53 }
52 } 54 }
53 mutex_unlock(&ld->ops_lock); 55 mutex_unlock(&ld->ops_lock);
56 unlock_fb_info(evdata->info);
54 return 0; 57 return 0;
55} 58}
56 59