projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rkfb: select current screen in lcdc driver
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
video
/
fbsysfs.c
diff --git
a/drivers/video/fbsysfs.c
b/drivers/video/fbsysfs.c
index 04251ce89184bbfc752e2d927f48d0f534841c7b..67afa9c2289d539e281bb831aa2260c0fba1205b 100644
(file)
--- a/
drivers/video/fbsysfs.c
+++ b/
drivers/video/fbsysfs.c
@@
-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;
}