diff options
author | <aherrman@de.ibm.com> | 2005-04-02 14:57:17 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic> | 2005-04-16 21:09:17 -0400 |
commit | e183b06bf0be6c525867476df186d20f8f1efe54 (patch) | |
tree | 49e1e0d32f6e5104b670d2d263003b5cab8b647e /drivers/s390/scsi | |
parent | cb59e840838193957a84ad22f7e1465a06a7c10c (diff) |
[PATCH] zfcp: convert to compat_ioctl
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 6a43322ccb0a..ce398aa9e019 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -52,19 +52,18 @@ static inline int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *, | |||
52 | static inline int zfcp_sg_list_copy_to_user(void __user *, | 52 | static inline int zfcp_sg_list_copy_to_user(void __user *, |
53 | struct zfcp_sg_list *, size_t); | 53 | struct zfcp_sg_list *, size_t); |
54 | 54 | ||
55 | static int zfcp_cfdc_dev_ioctl(struct inode *, struct file *, | 55 | static int zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long); |
56 | unsigned int, unsigned long); | ||
57 | 56 | ||
58 | #define ZFCP_CFDC_IOC_MAGIC 0xDD | 57 | #define ZFCP_CFDC_IOC_MAGIC 0xDD |
59 | #define ZFCP_CFDC_IOC \ | 58 | #define ZFCP_CFDC_IOC \ |
60 | _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_sense_data) | 59 | _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_sense_data) |
61 | 60 | ||
62 | #ifdef CONFIG_COMPAT | ||
63 | static struct ioctl_trans zfcp_ioctl_trans = {ZFCP_CFDC_IOC, (void*) sys_ioctl}; | ||
64 | #endif | ||
65 | 61 | ||
66 | static struct file_operations zfcp_cfdc_fops = { | 62 | static struct file_operations zfcp_cfdc_fops = { |
67 | .ioctl = zfcp_cfdc_dev_ioctl | 63 | .unlocked_ioctl = zfcp_cfdc_dev_ioctl, |
64 | #ifdef CONFIG_COMPAT | ||
65 | .compat_ioctl = zfcp_cfdc_dev_ioctl | ||
66 | #endif | ||
68 | }; | 67 | }; |
69 | 68 | ||
70 | static struct miscdevice zfcp_cfdc_misc = { | 69 | static struct miscdevice zfcp_cfdc_misc = { |
@@ -308,23 +307,16 @@ zfcp_module_init(void) | |||
308 | if (!zfcp_transport_template) | 307 | if (!zfcp_transport_template) |
309 | return -ENODEV; | 308 | return -ENODEV; |
310 | 309 | ||
311 | retval = register_ioctl32_conversion(zfcp_ioctl_trans.cmd, | ||
312 | zfcp_ioctl_trans.handler); | ||
313 | if (retval != 0) { | ||
314 | ZFCP_LOG_INFO("registration of ioctl32 conversion failed\n"); | ||
315 | goto out; | ||
316 | } | ||
317 | |||
318 | retval = misc_register(&zfcp_cfdc_misc); | 310 | retval = misc_register(&zfcp_cfdc_misc); |
319 | if (retval != 0) { | 311 | if (retval != 0) { |
320 | ZFCP_LOG_INFO("registration of misc device " | 312 | ZFCP_LOG_INFO("registration of misc device " |
321 | "zfcp_cfdc failed\n"); | 313 | "zfcp_cfdc failed\n"); |
322 | goto out_misc_register; | 314 | goto out; |
323 | } else { | ||
324 | ZFCP_LOG_TRACE("major/minor for zfcp_cfdc: %d/%d\n", | ||
325 | ZFCP_CFDC_DEV_MAJOR, zfcp_cfdc_misc.minor); | ||
326 | } | 315 | } |
327 | 316 | ||
317 | ZFCP_LOG_TRACE("major/minor for zfcp_cfdc: %d/%d\n", | ||
318 | ZFCP_CFDC_DEV_MAJOR, zfcp_cfdc_misc.minor); | ||
319 | |||
328 | /* Initialise proc semaphores */ | 320 | /* Initialise proc semaphores */ |
329 | sema_init(&zfcp_data.config_sema, 1); | 321 | sema_init(&zfcp_data.config_sema, 1); |
330 | 322 | ||
@@ -348,8 +340,6 @@ zfcp_module_init(void) | |||
348 | 340 | ||
349 | out_ccw_register: | 341 | out_ccw_register: |
350 | misc_deregister(&zfcp_cfdc_misc); | 342 | misc_deregister(&zfcp_cfdc_misc); |
351 | out_misc_register: | ||
352 | unregister_ioctl32_conversion(zfcp_ioctl_trans.cmd); | ||
353 | out: | 343 | out: |
354 | return retval; | 344 | return retval; |
355 | } | 345 | } |
@@ -370,9 +360,9 @@ zfcp_module_init(void) | |||
370 | * -EPERM - Cannot create or queue FSF request or create SBALs | 360 | * -EPERM - Cannot create or queue FSF request or create SBALs |
371 | * -ERESTARTSYS- Received signal (is mapped to EAGAIN by VFS) | 361 | * -ERESTARTSYS- Received signal (is mapped to EAGAIN by VFS) |
372 | */ | 362 | */ |
373 | static int | 363 | static long |
374 | zfcp_cfdc_dev_ioctl(struct inode *inode, struct file *file, | 364 | zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, |
375 | unsigned int command, unsigned long buffer) | 365 | unsigned long buffer) |
376 | { | 366 | { |
377 | struct zfcp_cfdc_sense_data *sense_data, __user *sense_data_user; | 367 | struct zfcp_cfdc_sense_data *sense_data, __user *sense_data_user; |
378 | struct zfcp_adapter *adapter = NULL; | 368 | struct zfcp_adapter *adapter = NULL; |