Commit 13c6204f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] s390: use normal switch statement for ioctls in dasd_ioctlc

Handle ioctls implemented in dasd_ioctl through the normal switch statement
that most drivers use instead of the awkward dasd_ioctl_no_register routine.
This avoids searching a linear list on every call to dasd_ioctl(), and allows
to give the various ioctl implementation functions sane prototypes, aswell as
moving the check for bdev->bd_disk->private_data from the individual functions
to dasd_ioctl.  (I think it can't actually every be NULL, but let's keep that
for later)
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 61d3ad0e
...@@ -1807,7 +1807,6 @@ dasd_exit(void) ...@@ -1807,7 +1807,6 @@ dasd_exit(void)
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
dasd_proc_exit(); dasd_proc_exit();
#endif #endif
dasd_ioctl_exit();
if (dasd_page_cache != NULL) { if (dasd_page_cache != NULL) {
kmem_cache_destroy(dasd_page_cache); kmem_cache_destroy(dasd_page_cache);
dasd_page_cache = NULL; dasd_page_cache = NULL;
...@@ -2093,9 +2092,6 @@ dasd_init(void) ...@@ -2093,9 +2092,6 @@ dasd_init(void)
rc = dasd_parse(); rc = dasd_parse();
if (rc) if (rc)
goto failed; goto failed;
rc = dasd_ioctl_init();
if (rc)
goto failed;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
rc = dasd_proc_init(); rc = dasd_proc_init();
if (rc) if (rc)
......
...@@ -523,8 +523,6 @@ int dasd_scan_partitions(struct dasd_device *); ...@@ -523,8 +523,6 @@ int dasd_scan_partitions(struct dasd_device *);
void dasd_destroy_partitions(struct dasd_device *); void dasd_destroy_partitions(struct dasd_device *);
/* externals in dasd_ioctl.c */ /* externals in dasd_ioctl.c */
int dasd_ioctl_init(void);
void dasd_ioctl_exit(void);
int dasd_ioctl_no_register(struct module *, int, dasd_ioctl_fn_t); int dasd_ioctl_no_register(struct module *, int, dasd_ioctl_fn_t);
int dasd_ioctl_no_unregister(struct module *, int, dasd_ioctl_fn_t); int dasd_ioctl_no_unregister(struct module *, int, dasd_ioctl_fn_t);
int dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long); int dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
......
This diff is collapsed.
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