summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/core/fbsysfs.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2019-06-19 12:33:05 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2019-06-19 12:33:05 +0200
commitd609f60addfcb32bcaccc1d2339a9a261870ece4 (patch)
tree052781aa7924ffa708663d1c35025061171434a6 /drivers/video/fbdev/core/fbsysfs.c
parentbcb7416e3480c1abb46266bdab874b3b3d6124cb (diff)
parent2443091408c267f84b40025183490486b79ee2cd (diff)
downloadtalos-op-linux-d609f60addfcb32bcaccc1d2339a9a261870ece4.tar.gz
talos-op-linux-d609f60addfcb32bcaccc1d2339a9a261870ece4.zip
Merge branch 'topic/remove-fbcon-notifiers' into drm-misc-next
topic/remove-fbcon-notifiers: - remove fbdev notifier usage for fbcon, as prep work to clean up the fbcon locking - assorted locking checks in vt/console code - assorted notifier and cleanups in fbdev and backlight code This is the pull request that was sent out, plus the compile fix for sh4 reported by kbuild. Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/video/fbdev/core/fbsysfs.c')
-rw-r--r--drivers/video/fbdev/core/fbsysfs.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c
index 954ed99e80da..d54c88f88991 100644
--- a/drivers/video/fbdev/core/fbsysfs.c
+++ b/drivers/video/fbdev/core/fbsysfs.c
@@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/fb.h>
+#include <linux/fbcon.h>
#include <linux/console.h>
#include <linux/module.h>
@@ -175,10 +176,7 @@ static ssize_t store_modes(struct device *device,
return -EINVAL;
console_lock();
- if (!lock_fb_info(fb_info)) {
- console_unlock();
- return -ENODEV;
- }
+ lock_fb_info(fb_info);
list_splice(&fb_info->modelist, &old_list);
fb_videomode_to_modelist((const struct fb_videomode *)buf, i,
@@ -304,12 +302,13 @@ static ssize_t store_blank(struct device *device,
{
struct fb_info *fb_info = dev_get_drvdata(device);
char *last = NULL;
- int err;
+ int err, arg;
+ arg = simple_strtoul(buf, &last, 0);
console_lock();
- fb_info->flags |= FBINFO_MISC_USEREVENT;
- err = fb_blank(fb_info, simple_strtoul(buf, &last, 0));
- fb_info->flags &= ~FBINFO_MISC_USEREVENT;
+ err = fb_blank(fb_info, arg);
+ /* might again call into fb_blank */
+ fbcon_fb_blanked(fb_info, arg);
console_unlock();
if (err < 0)
return err;
@@ -405,10 +404,7 @@ static ssize_t store_fbstate(struct device *device,
state = simple_strtoul(buf, &last, 0);
console_lock();
- if (!lock_fb_info(fb_info)) {
- console_unlock();
- return -ENODEV;
- }
+ lock_fb_info(fb_info);
fb_set_suspend(fb_info, (int)state);
OpenPOWER on IntegriCloud