From: Patrick G. Bridges Date: Fri, 24 Feb 2012 18:06:31 +0000 (-0700) Subject: Fixed host device and keyed stream compilation on different linux kernel versions X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=db0b003cd20ee08be24c6f3e7f2b5cc578d57aae;p=palacios.git Fixed host device and keyed stream compilation on different linux kernel versions --- diff --git a/linux_module/iface-host-dev.c b/linux_module/iface-host-dev.c index 22070da..cfcf4c0 100644 --- a/linux_module/iface-host-dev.c +++ b/linux_module/iface-host-dev.c @@ -342,7 +342,7 @@ static int host_dev_release(struct inode * i, struct file * filp) return 0; } -static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, unsigned long arg) +static long host_dev_ioctl(struct file * fp, unsigned int val, unsigned long arg) { void __user *argp = (void __user *)arg; @@ -595,18 +595,11 @@ static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, u } -static long host_dev_compat_ioctl(struct file * filp, unsigned int ioctl, unsigned long arg) -{ - return host_dev_ioctl(NULL, filp, ioctl, arg); -} - static struct file_operations host_dev_fops = { .poll = host_dev_poll, .release = host_dev_release, -#ifdef HAVE_COMPAT_IOCTL - .compat_ioctl = host_dev_compat_ioctl, -#endif - .ioctl = host_dev_ioctl, + .compat_ioctl = host_dev_ioctl, + .unlocked_ioctl = host_dev_ioctl, }; diff --git a/linux_module/iface-keyed-stream.c b/linux_module/iface-keyed-stream.c index ae83ec1..a622eb0 100644 --- a/linux_module/iface-keyed-stream.c +++ b/linux_module/iface-keyed-stream.c @@ -876,7 +876,7 @@ static unsigned int keyed_stream_poll_user(struct file *filp, poll_table *wait) return 0; } -static int keyed_stream_ioctl_user(struct inode *inode, struct file *filp, unsigned int ioctl, unsigned long arg) +static long keyed_stream_ioctl_user(struct file * filp, unsigned int ioctl, unsigned long arg) { void __user *argp = (void __user *)arg; unsigned long flags; @@ -985,10 +985,6 @@ static int keyed_stream_ioctl_user(struct inode *inode, struct file *filp, unsig } } -static long keyed_stream_compat_ioctl_user(struct file * filp, unsigned int ioctl, unsigned long arg) -{ - return keyed_stream_ioctl_user(NULL, filp, ioctl, arg); -} static int keyed_stream_release_user(struct inode *inode, struct file *filp) { @@ -1011,10 +1007,8 @@ static int keyed_stream_release_user(struct inode *inode, struct file *filp) static struct file_operations user_keyed_stream_fops = { .poll = keyed_stream_poll_user, -#ifdef HAVE_COMPAT_IOCTL - .compat_ioctl = keyed_stream_compat_ioctl_user, -#endif - .ioctl = keyed_stream_ioctl_user, + .compat_ioctl = keyed_stream_ioctl_user, + .unlocked_ioctl = keyed_stream_ioctl_user, .release = keyed_stream_release_user, };