diff options
author | Jason Chen <b02280@freescale.com> | 2010-07-15 11:02:24 +0800 |
---|---|---|
committer | Jason Chen <b02280@freescale.com> | 2010-07-15 18:08:03 +0800 |
commit | c879f2d830994336ac1bc611997a9ba1e0a75075 (patch) | |
tree | bb65d0ac3d527835257fe1562e7eabc69c049475 | |
parent | dc0a599f1a135c95df1540724aa9ca20d4c9334d (diff) |
ENGR00125171 ipu dev: add sync method
The memory mmap by ipu device is write-back, so user space need sync
method.
Signed-off-by: Jason Chen <b02280@freescale.com>
-rw-r--r-- | drivers/mxc/ipu3/ipu_device.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c index 7f7d829f7218..c98e51c8b389 100644 --- a/drivers/mxc/ipu3/ipu_device.c +++ b/drivers/mxc/ipu3/ipu_device.c @@ -463,12 +463,20 @@ static int mxc_ipu_release(struct inode *inode, struct file *file) return 0; } +int mxc_ipu_fsync(struct file *filp, struct dentry *dentry, int datasync) +{ + flush_cache_all(); + outer_flush_all(); + return 0; +} + static struct file_operations mxc_ipu_fops = { .owner = THIS_MODULE, .open = mxc_ipu_open, .mmap = mxc_ipu_mmap, .release = mxc_ipu_release, - .ioctl = mxc_ipu_ioctl + .ioctl = mxc_ipu_ioctl, + .fsync = mxc_ipu_fsync }; int register_ipu_device() |