diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-06 08:03:18 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-06 08:03:18 +0200 |
commit | b88e2318f7414d5291e18a93bd409465a81b2fa9 (patch) | |
tree | 66dd5f10c229fbc3fd34b5c621c8e2e68c4390ee /linux/drivers/media/video/ivtv | |
parent | ec13d7733f919cd77d848cb9f97b01bbb88ece56 (diff) | |
download | mediapointer-dvb-s2-b88e2318f7414d5291e18a93bd409465a81b2fa9.tar.gz mediapointer-dvb-s2-b88e2318f7414d5291e18a93bd409465a81b2fa9.tar.bz2 |
ivtvfb: Enable DMA write() for kernels < 2.6.22
From: Ian Armstrong <ian@iarmst.demon.co.uk>
Allows kernels < 2.6.22 to use DMA for fbdev write() operations.
Priority: normal
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtvfb.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtvfb.c b/linux/drivers/media/video/ivtv/ivtvfb.c index b448e2c28..1ac3af3fc 100644 --- a/linux/drivers/media/video/ivtv/ivtvfb.c +++ b/linux/drivers/media/video/ivtv/ivtvfb.c @@ -368,8 +368,16 @@ static int ivtvfb_prep_frame(struct ivtv *itv, int cmd, void __user *source, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf, - size_t count, loff_t *ppos) + size_t count, loff_t *ppos) { +#else +static ssize_t ivtvfb_write(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) +{ + struct inode *inode = file->f_dentry->d_inode; + int fbidx = iminor(inode); + struct fb_info *info = registered_fb[fbidx]; +#endif unsigned long p = *ppos; void *dst; int err = 0; @@ -443,7 +451,6 @@ static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf, return (err) ? err : count; } -#endif static int ivtvfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { @@ -909,9 +916,7 @@ static int ivtvfb_blank(int blank_mode, struct fb_info *info) static struct fb_ops ivtvfb_ops = { .owner = THIS_MODULE, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) .fb_write = ivtvfb_write, -#endif .fb_check_var = ivtvfb_check_var, .fb_set_par = ivtvfb_set_par, .fb_setcolreg = ivtvfb_setcolreg, |