rk30 lcdc: display lut support
[firefly-linux-kernel-4.4.55.git] / drivers / video / fbsysfs.c
index 04251ce89184bbfc752e2d927f48d0f534841c7b..67afa9c2289d539e281bb831aa2260c0fba1205b 100644 (file)
@@ -399,9 +399,12 @@ static ssize_t store_fbstate(struct device *device,
 
        state = simple_strtoul(buf, &last, 0);
 
+       if (!lock_fb_info(fb_info))
+               return -ENODEV;
        console_lock();
        fb_set_suspend(fb_info, (int)state);
        console_unlock();
+       unlock_fb_info(fb_info);
 
        return count;
 }