diff options
author | Christoph Hellwig <hch@lst.de> | 2006-03-24 06:15:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 10:33:17 -0500 |
commit | 82814dbafdeef53e13e07134eb3b7be3c975fd21 (patch) | |
tree | c54dded7519743b678b73fabffea6108fb456eb6 /drivers/s390/block/dasd_ioctl.c | |
parent | 8b2eb664ce9dcba8b54ececf5e057470c47e57f7 (diff) |
[PATCH] s390: remove dynamic dasd ioctls
Now that there are no more users of the awkward dynamic ioctl hack we can
remove the code to support it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/block/dasd_ioctl.c')
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index c8319bef2730..e1dc0ffee027 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -24,59 +24,6 @@ | |||
24 | 24 | ||
25 | #include "dasd_int.h" | 25 | #include "dasd_int.h" |
26 | 26 | ||
27 | /* | ||
28 | * SECTION: ioctl functions. | ||
29 | */ | ||
30 | static struct list_head dasd_ioctl_list = LIST_HEAD_INIT(dasd_ioctl_list); | ||
31 | |||
32 | /* | ||
33 | * Find the ioctl with number no. | ||
34 | */ | ||
35 | static struct dasd_ioctl * | ||
36 | dasd_find_ioctl(int no) | ||
37 | { | ||
38 | struct dasd_ioctl *ioctl; | ||
39 | |||
40 | list_for_each_entry (ioctl, &dasd_ioctl_list, list) | ||
41 | if (ioctl->no == no) | ||
42 | return ioctl; | ||
43 | return NULL; | ||
44 | } | ||
45 | |||
46 | /* | ||
47 | * Register ioctl with number no. | ||
48 | */ | ||
49 | int | ||
50 | dasd_ioctl_no_register(struct module *owner, int no, dasd_ioctl_fn_t handler) | ||
51 | { | ||
52 | struct dasd_ioctl *new; | ||
53 | if (dasd_find_ioctl(no)) | ||
54 | return -EBUSY; | ||
55 | new = kmalloc(sizeof (struct dasd_ioctl), GFP_KERNEL); | ||
56 | if (new == NULL) | ||
57 | return -ENOMEM; | ||
58 | new->owner = owner; | ||
59 | new->no = no; | ||
60 | new->handler = handler; | ||
61 | list_add(&new->list, &dasd_ioctl_list); | ||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | /* | ||
66 | * Deregister ioctl with number no. | ||
67 | */ | ||
68 | int | ||
69 | dasd_ioctl_no_unregister(struct module *owner, int no, dasd_ioctl_fn_t handler) | ||
70 | { | ||
71 | struct dasd_ioctl *old = dasd_find_ioctl(no); | ||
72 | if (old == NULL) | ||
73 | return -ENOENT; | ||
74 | if (old->no != no || old->handler != handler || owner != old->owner) | ||
75 | return -EINVAL; | ||
76 | list_del(&old->list); | ||
77 | kfree(old); | ||
78 | return 0; | ||
79 | } | ||
80 | 27 | ||
81 | static int | 28 | static int |
82 | dasd_ioctl_api_version(void __user *argp) | 29 | dasd_ioctl_api_version(void __user *argp) |
@@ -429,8 +376,6 @@ dasd_ioctl(struct inode *inode, struct file *file, | |||
429 | struct block_device *bdev = inode->i_bdev; | 376 | struct block_device *bdev = inode->i_bdev; |
430 | struct dasd_device *device = bdev->bd_disk->private_data; | 377 | struct dasd_device *device = bdev->bd_disk->private_data; |
431 | void __user *argp = (void __user *)arg; | 378 | void __user *argp = (void __user *)arg; |
432 | struct dasd_ioctl *ioctl; | ||
433 | int rc; | ||
434 | 379 | ||
435 | if (!device) | 380 | if (!device) |
436 | return -ENODEV; | 381 | return -ENODEV; |
@@ -477,17 +422,6 @@ dasd_ioctl(struct inode *inode, struct file *file, | |||
477 | return rval; | 422 | return rval; |
478 | } | 423 | } |
479 | 424 | ||
480 | /* else resort to the deprecated dynamic ioctl list */ | ||
481 | list_for_each_entry(ioctl, &dasd_ioctl_list, list) { | ||
482 | if (ioctl->no == cmd) { | ||
483 | /* Found a matching ioctl. Call it. */ | ||
484 | if (!try_module_get(ioctl->owner)) | ||
485 | continue; | ||
486 | rc = ioctl->handler(bdev, cmd, arg); | ||
487 | module_put(ioctl->owner); | ||
488 | return rc; | ||
489 | } | ||
490 | } | ||
491 | return -EINVAL; | 425 | return -EINVAL; |
492 | } | 426 | } |
493 | } | 427 | } |
@@ -503,6 +437,3 @@ dasd_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
503 | 437 | ||
504 | return (rval == -EINVAL) ? -ENOIOCTLCMD : rval; | 438 | return (rval == -EINVAL) ? -ENOIOCTLCMD : rval; |
505 | } | 439 | } |
506 | |||
507 | EXPORT_SYMBOL(dasd_ioctl_no_register); | ||
508 | EXPORT_SYMBOL(dasd_ioctl_no_unregister); | ||