diff options
-rw-r--r-- | drivers/video/fb_defio.c | 12 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 3 | ||||
-rw-r--r-- | include/linux/fb.h | 6 |
3 files changed, 19 insertions, 2 deletions
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c index 65f4e6ee7f94..f963f5f59b73 100644 --- a/drivers/video/fb_defio.c +++ b/drivers/video/fb_defio.c | |||
@@ -47,6 +47,18 @@ static struct page* fb_deferred_io_nopage(struct vm_area_struct *vma, | |||
47 | return page; | 47 | return page; |
48 | } | 48 | } |
49 | 49 | ||
50 | int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, int datasync) | ||
51 | { | ||
52 | struct fb_info *info = file->private_data; | ||
53 | |||
54 | /* Kill off the delayed work */ | ||
55 | cancel_rearming_delayed_work(&info->deferred_work); | ||
56 | |||
57 | /* Run it immediately */ | ||
58 | return schedule_delayed_work(&info->deferred_work, 0); | ||
59 | } | ||
60 | EXPORT_SYMBOL_GPL(fb_deferred_io_fsync); | ||
61 | |||
50 | /* vm_ops->page_mkwrite handler */ | 62 | /* vm_ops->page_mkwrite handler */ |
51 | static int fb_deferred_io_mkwrite(struct vm_area_struct *vma, | 63 | static int fb_deferred_io_mkwrite(struct vm_area_struct *vma, |
52 | struct page *page) | 64 | struct page *page) |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 28225265159a..44cf0e4f52e9 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1266,6 +1266,9 @@ static const struct file_operations fb_fops = { | |||
1266 | #ifdef HAVE_ARCH_FB_UNMAPPED_AREA | 1266 | #ifdef HAVE_ARCH_FB_UNMAPPED_AREA |
1267 | .get_unmapped_area = get_fb_unmapped_area, | 1267 | .get_unmapped_area = get_fb_unmapped_area, |
1268 | #endif | 1268 | #endif |
1269 | #ifdef CONFIG_FB_DEFERRED_IO | ||
1270 | .fsync = fb_deferred_io_fsync, | ||
1271 | #endif | ||
1269 | }; | 1272 | }; |
1270 | 1273 | ||
1271 | struct class *fb_class; | 1274 | struct class *fb_class; |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 8a8255b94b62..0de426026f4a 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <linux/i2c.h> | 5 | #include <linux/i2c.h> |
6 | 6 | ||
7 | struct dentry; | ||
8 | |||
7 | /* Definitions of frame buffers */ | 9 | /* Definitions of frame buffers */ |
8 | 10 | ||
9 | #define FB_MAJOR 29 | 11 | #define FB_MAJOR 29 |
@@ -927,11 +929,11 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, | |||
927 | } | 929 | } |
928 | } | 930 | } |
929 | 931 | ||
930 | #ifdef CONFIG_FB_DEFERRED_IO | ||
931 | /* drivers/video/fb_defio.c */ | 932 | /* drivers/video/fb_defio.c */ |
932 | extern void fb_deferred_io_init(struct fb_info *info); | 933 | extern void fb_deferred_io_init(struct fb_info *info); |
933 | extern void fb_deferred_io_cleanup(struct fb_info *info); | 934 | extern void fb_deferred_io_cleanup(struct fb_info *info); |
934 | #endif | 935 | extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, |
936 | int datasync); | ||
935 | 937 | ||
936 | /* drivers/video/fbsysfs.c */ | 938 | /* drivers/video/fbsysfs.c */ |
937 | extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); | 939 | extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); |