diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-26 07:45:37 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-26 07:45:37 +0200 |
commit | 94d4ac2f4a58c6e37876827c6688c61cef21290c (patch) | |
tree | 732f4e4794f3c116041242f69754637f75c0dd57 /drivers/video/fb_defio.c | |
parent | x86: cleanup in amd_cpu_notify() (diff) | |
parent | x86: msr: fix bogus return values from rdmsr_safe/wrmsr_safe (diff) | |
download | linux-94d4ac2f4a58c6e37876827c6688c61cef21290c.tar.xz linux-94d4ac2f4a58c6e37876827c6688c61cef21290c.zip |
Merge branch 'x86/urgent' into x86/cleanups
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; |