*** ./dvb_loopback.c	2010-11-14 22:43:16.343000005 +0100
--- /usr/local/src/sc/contrib/sasc-ng/dvbloopback/module/dvb_loopback.c	2010-11-14 20:43:04.338000001 +0100
***************
*** 118,126 ****
  /* This is a copy of dvb_usercopy.  We need to do this because it isn't exported
     by dvbdev
  */
! static int dvblb_usercopy(struct inode *inode, struct file *file,
  		     unsigned int cmd, unsigned long arg,
! 		     int (*func)(struct inode *inode, struct file *file,
  		     unsigned int cmd, void *arg))
  {
  	char    sbuf[128];
--- 118,126 ----
  /* This is a copy of dvb_usercopy.  We need to do this because it isn't exported
     by dvbdev
  */
! static int dvblb_usercopy(struct file *file,
  		     unsigned int cmd, unsigned long arg,
! 		     int (*func)(struct file *file,
  		     unsigned int cmd, void *arg))
  {
  	char    sbuf[128];
***************
*** 180,186 ****
  	}
  
  	/* call driver */
! 	if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)
  		err = -EINVAL;
  
  	if (err < 0)
--- 180,186 ----
  	}
  
  	/* call driver */
! 	if ((err = func(file, cmd, parg)) == -ENOIOCTLCMD)
  		err = -EINVAL;
  
  	if (err < 0)
***************
*** 663,669 ****
     dvb_generic_ioctl) which is called by dvblb_ioctl for device-0.  It is
     used to forward ioctl commands back to the userspace application
  */
! static int dvblb_looped_ioctl(struct inode *inode, struct file *f,
  	unsigned int cmd, void *parg)
  {
  	int ret;
--- 663,669 ----
     dvb_generic_ioctl) which is called by dvblb_ioctl for device-0.  It is
     used to forward ioctl commands back to the userspace application
  */
! static int dvblb_looped_ioctl(struct file *f,
  	unsigned int cmd, void *parg)
  {
  	int ret;
***************
*** 692,698 ****
  	return ret;
  }
  
! static int dvblb_ioctl(struct inode *inode, struct file *f,
  	unsigned int cmd, unsigned long arg)
  {
  	void * parg = (void *)arg;
--- 692,698 ----
  	return ret;
  }
  
! static long dvblb_ioctl(struct file *f,
  	unsigned int cmd, unsigned long arg)
  {
  	void * parg = (void *)arg;
***************
*** 723,729 ****
  		if (lbdev->forward_dev)
  			return dvblb_forward_ioctl(lbdev, f, cmd, arg);
  
! 		return dvblb_usercopy (inode, f, cmd, arg,
  		                       dvbdev->kernel_ioctl);
  	}
  	/* This is the userspace control device */
--- 723,729 ----
  		if (lbdev->forward_dev)
  			return dvblb_forward_ioctl(lbdev, f, cmd, arg);
  
! 		return dvblb_usercopy (f, cmd, arg,
  		                       dvbdev->kernel_ioctl);
  	}
  	/* This is the userspace control device */
***************
*** 978,984 ****
  	.write		= dvblb_write,
  	.poll		= dvblb_poll,
  	.mmap		= dvblb_mmap,
! 	.ioctl		= dvblb_ioctl,
  };
  
  static struct dvb_device dvbdev_looped = {
--- 978,984 ----
  	.write		= dvblb_write,
  	.poll		= dvblb_poll,
  	.mmap		= dvblb_mmap,
! 	.unlocked_ioctl		= dvblb_ioctl,
  };
  
  static struct dvb_device dvbdev_looped = {
***************
*** 998,1004 ****
  	.write		= dvblb_write,
  	.poll		= dvblb_poll,
  	.mmap		= dvblb_mmap,
! 	.ioctl		= dvblb_ioctl,
  };
  
  static struct dvb_device dvbdev_userspace = {
--- 998,1004 ----
  	.write		= dvblb_write,
  	.poll		= dvblb_poll,
  	.mmap		= dvblb_mmap,
! 	.unlocked_ioctl		= dvblb_ioctl,
  };
  
  static struct dvb_device dvbdev_userspace = {
*** ./dvblb_forward.c	2010-11-14 22:43:16.344000005 +0100
--- /usr/local/src/sc/contrib/sasc-ng/dvbloopback/module/dvblb_forward.c	2010-11-09 21:50:08.451999999 +0100
***************
*** 166,174 ****
  	struct file *ftmp = find_forwardmap(lbdev, f->private_data);
  	if (!ftmp || IS_ERR(ftmp))
  		return -EFAULT;
! 	if (lbdev->forward_dev->fops &&lbdev->forward_dev->fops->ioctl)
! 		return lbdev->forward_dev->fops->ioctl(
! 		           ftmp->f_dentry->d_inode, ftmp, cmd, arg);
  	return -EFAULT;
  }
  
--- 166,174 ----
  	struct file *ftmp = find_forwardmap(lbdev, f->private_data);
  	if (!ftmp || IS_ERR(ftmp))
  		return -EFAULT;
! 	if (lbdev->forward_dev->fops &&lbdev->forward_dev->fops->unlocked_ioctl)
! 		return lbdev->forward_dev->fops->unlocked_ioctl(
! 		           ftmp, cmd, arg);
  	return -EFAULT;
  }
  
