Thread (14 messages) 14 messages, 3 authors, 2008-12-25
STALE6368d

[PATCH 01/05] video: fix deferred io fsync()

From: Magnus Damm <magnus.damm@gmail.com>
Date: 2008-12-19 06:34:09
Also in: linux-sh

From: Magnus Damm <redacted>

If CONFIG_FB_DEFERRED_IO is set, but there are framebuffers 
registered that does not make use of deferred io, then fsync()
on those framebuffers will result in a crash. Fix that.

This is needed for sh_mobile_lcdcfb since we always enable
deferred io at compile time but we may disable deferred io
for some types of hardware configurations.

Signed-off-by: Magnus Damm <redacted>
---

 drivers/video/fb_defio.c |    4 ++++
 1 file changed, 4 insertions(+)
--- 0001/drivers/video/fb_defio.c
+++ work/drivers/video/fb_defio.c	2008-12-17 15:27:44.000000000 +0900
@@ -60,6 +60,10 @@ int fb_deferred_io_fsync(struct file *fi
 {
 	struct fb_info *info = file->private_data;
 
+	/* Skip if deferred io is complied-in but disabled on this fbdev */
+	if (!info->fbdefio)
+		return 0;
+
 	/* Kill off the delayed work */
 	cancel_rearming_delayed_work(&info->deferred_work);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help