diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-25 14:39:12 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-25 14:39:12 +0200 |
commit | f58899bb0224741eb0409ada67ecafe90ba137ef (patch) | |
tree | 78284f77021e830b32e77071dd2ef4e5ccdaa289 /drivers/video/fb_defio.c | |
parent | a2bd7274b47124d2fc4dfdb8c0591f545ba749dd (diff) | |
parent | 83097aca8567a0bd593534853b71fe0fa9a75d69 (diff) |
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'drivers/video/fb_defio.c')
-rw-r--r-- | drivers/video/fb_defio.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c index 59df132cc375..4835bdc4e9f1 100644 --- a/drivers/video/fb_defio.c +++ b/drivers/video/fb_defio.c @@ -114,6 +114,17 @@ static struct vm_operations_struct fb_deferred_io_vm_ops = { .page_mkwrite = fb_deferred_io_mkwrite, }; +static int fb_deferred_io_set_page_dirty(struct page *page) +{ + if (!PageDirty(page)) + SetPageDirty(page); + return 0; +} + +static const struct address_space_operations fb_deferred_io_aops = { + .set_page_dirty = fb_deferred_io_set_page_dirty, +}; + static int fb_deferred_io_mmap(struct fb_info *info, struct vm_area_struct *vma) { vma->vm_ops = &fb_deferred_io_vm_ops; @@ -163,6 +174,14 @@ void fb_deferred_io_init(struct fb_info *info) } EXPORT_SYMBOL_GPL(fb_deferred_io_init); +void fb_deferred_io_open(struct fb_info *info, + struct inode *inode, + struct file *file) +{ + file->f_mapping->a_ops = &fb_deferred_io_aops; +} +EXPORT_SYMBOL_GPL(fb_deferred_io_open); + void fb_deferred_io_cleanup(struct fb_info *info) { void *screen_base = (void __force *) info->screen_base; |