aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/backlight.c')
-rw-r--r--drivers/video/backlight/backlight.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 157057c79ca3..dd37cbcaf8ce 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self,
35 return 0; 35 return 0;
36 36
37 bd = container_of(self, struct backlight_device, fb_notif); 37 bd = container_of(self, struct backlight_device, fb_notif);
38 if (!lock_fb_info(evdata->info))
39 return -ENODEV;
38 mutex_lock(&bd->ops_lock); 40 mutex_lock(&bd->ops_lock);
39 if (bd->ops) 41 if (bd->ops)
40 if (!bd->ops->check_fb || 42 if (!bd->ops->check_fb ||
@@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self,
47 backlight_update_status(bd); 49 backlight_update_status(bd);
48 } 50 }
49 mutex_unlock(&bd->ops_lock); 51 mutex_unlock(&bd->ops_lock);
52 unlock_fb_info(evdata->info);
50 return 0; 53 return 0;
51} 54}
52 55