Commit 981d2489 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Convert Infiniband MAD driver to compat/unlocked_ioctl

Convert MAD driver to compat/unlocked_ioctl. Streamlines the code a bit.
Signed-off-by: default avatarAndi Kleen <ak@muc.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dc539241
...@@ -449,7 +449,7 @@ static int ib_umad_unreg_agent(struct ib_umad_file *file, unsigned long arg) ...@@ -449,7 +449,7 @@ static int ib_umad_unreg_agent(struct ib_umad_file *file, unsigned long arg)
return ret; return ret;
} }
static int ib_umad_ioctl(struct inode *inode, struct file *filp, static long ib_umad_ioctl(struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
switch (cmd) { switch (cmd) {
...@@ -506,7 +506,8 @@ static struct file_operations umad_fops = { ...@@ -506,7 +506,8 @@ static struct file_operations umad_fops = {
.read = ib_umad_read, .read = ib_umad_read,
.write = ib_umad_write, .write = ib_umad_write,
.poll = ib_umad_poll, .poll = ib_umad_poll,
.ioctl = ib_umad_ioctl, .unlocked_ioctl = ib_umad_ioctl,
.compat_ioctl = ib_umad_ioctl,
.open = ib_umad_open, .open = ib_umad_open,
.release = ib_umad_close .release = ib_umad_close
}; };
...@@ -702,17 +703,8 @@ static int __init ib_umad_init(void) ...@@ -702,17 +703,8 @@ static int __init ib_umad_init(void)
goto out_class; goto out_class;
} }
/* Our ioctls are 32/64 clean */
ret = register_ioctl32_conversion(IB_USER_MAD_REGISTER_AGENT, NULL);
ret |= register_ioctl32_conversion(IB_USER_MAD_UNREGISTER_AGENT, NULL);
if (ret) {
printk(KERN_ERR "user_mad: couldn't register ioctl32 conversions\n");
goto out_client;
}
return 0; return 0;
out_client:
ib_unregister_client(&umad_client); ib_unregister_client(&umad_client);
out_class: out_class:
...@@ -727,8 +719,6 @@ static int __init ib_umad_init(void) ...@@ -727,8 +719,6 @@ static int __init ib_umad_init(void)
static void __exit ib_umad_cleanup(void) static void __exit ib_umad_cleanup(void)
{ {
unregister_ioctl32_conversion(IB_USER_MAD_REGISTER_AGENT);
unregister_ioctl32_conversion(IB_USER_MAD_UNREGISTER_AGENT);
ib_unregister_client(&umad_client); ib_unregister_client(&umad_client);
class_unregister(&umad_class); class_unregister(&umad_class);
unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS); unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment