summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtvfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtvfb.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtvfb.c13
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,