int fb_blank = 0;
/* If we aren't interested in this event, skip it immediately ... */
- if (event != FB_EVENT_BLANK && event != FB_EVENT_CONBLANK)
+ if (event != FB_EVENT_BLANK && event != FB_EVENT_CONBLANK &&
+ event != FB_EARLY_EVENT_BLANK)
return 0;
bd = container_of(self, struct backlight_device, fb_notif);
bd->ops->check_fb(bd, evdata->info)) {
fb_blank = *(int *)evdata->data;
if (fb_blank == FB_BLANK_UNBLANK &&
- !bd->fb_bl_on[node]) {
+ !bd->fb_bl_on[node] &&
+ event != FB_EARLY_EVENT_BLANK) {
bd->fb_bl_on[node] = true;
if (!bd->use_count++) {
bd->props.state &= ~BL_CORE_FBBLANK;
backlight_update_status(bd);
}
} else if (fb_blank != FB_BLANK_UNBLANK &&
- bd->fb_bl_on[node]) {
+ bd->fb_bl_on[node] &&
+ event == FB_EARLY_EVENT_BLANK) {
bd->fb_bl_on[node] = false;
if (!(--bd->use_count)) {
bd->props.state |= BL_CORE_FBBLANK;