diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-23 01:45:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 01:45:46 -0500 |
commit | 6be325719b3e54624397e413efd4b33a997e55a3 (patch) | |
tree | 57f321a56794cab2222e179b16731e0d76a4a68a /drivers/s390/char | |
parent | 26d92f9276a56d55511a427fb70bd70886af647a (diff) | |
parent | 92dcffb916d309aa01778bf8963a6932e4014d07 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/con3215.c | 17 | ||||
-rw-r--r-- | drivers/s390/char/fs3270.c | 19 | ||||
-rw-r--r-- | drivers/s390/char/monreader.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/monwriter.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/sclp.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/tape_3590.c | 3 | ||||
-rw-r--r-- | drivers/s390/char/tape_block.c | 40 | ||||
-rw-r--r-- | drivers/s390/char/tape_char.c | 21 | ||||
-rw-r--r-- | drivers/s390/char/tape_class.c | 4 | ||||
-rw-r--r-- | drivers/s390/char/tape_core.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_proc.c | 3 | ||||
-rw-r--r-- | drivers/s390/char/tape_std.c | 3 | ||||
-rw-r--r-- | drivers/s390/char/vmcp.c | 12 | ||||
-rw-r--r-- | drivers/s390/char/vmlogrdr.c | 2 |
16 files changed, 60 insertions, 75 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 9d61683b5633..59ec073724bf 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -1037,22 +1037,6 @@ static void tty3215_flush_buffer(struct tty_struct *tty) | |||
1037 | } | 1037 | } |
1038 | 1038 | ||
1039 | /* | 1039 | /* |
1040 | * Currently we don't have any io controls for 3215 ttys | ||
1041 | */ | ||
1042 | static int tty3215_ioctl(struct tty_struct *tty, struct file * file, | ||
1043 | unsigned int cmd, unsigned long arg) | ||
1044 | { | ||
1045 | if (tty->flags & (1 << TTY_IO_ERROR)) | ||
1046 | return -EIO; | ||
1047 | |||
1048 | switch (cmd) { | ||
1049 | default: | ||
1050 | return -ENOIOCTLCMD; | ||
1051 | } | ||
1052 | return 0; | ||
1053 | } | ||
1054 | |||
1055 | /* | ||
1056 | * Disable reading from a 3215 tty | 1040 | * Disable reading from a 3215 tty |
1057 | */ | 1041 | */ |
1058 | static void tty3215_throttle(struct tty_struct * tty) | 1042 | static void tty3215_throttle(struct tty_struct * tty) |
@@ -1117,7 +1101,6 @@ static const struct tty_operations tty3215_ops = { | |||
1117 | .write_room = tty3215_write_room, | 1101 | .write_room = tty3215_write_room, |
1118 | .chars_in_buffer = tty3215_chars_in_buffer, | 1102 | .chars_in_buffer = tty3215_chars_in_buffer, |
1119 | .flush_buffer = tty3215_flush_buffer, | 1103 | .flush_buffer = tty3215_flush_buffer, |
1120 | .ioctl = tty3215_ioctl, | ||
1121 | .throttle = tty3215_throttle, | 1104 | .throttle = tty3215_throttle, |
1122 | .unthrottle = tty3215_unthrottle, | 1105 | .unthrottle = tty3215_unthrottle, |
1123 | .stop = tty3215_stop, | 1106 | .stop = tty3215_stop, |
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 28e4649fa9e4..31c59b0d6df0 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/smp_lock.h> | 16 | #include <linux/smp_lock.h> |
17 | 17 | ||
18 | #include <asm/compat.h> | ||
18 | #include <asm/ccwdev.h> | 19 | #include <asm/ccwdev.h> |
19 | #include <asm/cio.h> | 20 | #include <asm/cio.h> |
20 | #include <asm/ebcdic.h> | 21 | #include <asm/ebcdic.h> |
@@ -322,6 +323,7 @@ fs3270_write(struct file *filp, const char __user *data, size_t count, loff_t *o | |||
322 | static long | 323 | static long |
323 | fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 324 | fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
324 | { | 325 | { |
326 | char __user *argp; | ||
325 | struct fs3270 *fp; | 327 | struct fs3270 *fp; |
326 | struct raw3270_iocb iocb; | 328 | struct raw3270_iocb iocb; |
327 | int rc; | 329 | int rc; |
@@ -329,6 +331,10 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
329 | fp = filp->private_data; | 331 | fp = filp->private_data; |
330 | if (!fp) | 332 | if (!fp) |
331 | return -ENODEV; | 333 | return -ENODEV; |
334 | if (is_compat_task()) | ||
335 | argp = compat_ptr(arg); | ||
336 | else | ||
337 | argp = (char __user *)arg; | ||
332 | rc = 0; | 338 | rc = 0; |
333 | mutex_lock(&fs3270_mutex); | 339 | mutex_lock(&fs3270_mutex); |
334 | switch (cmd) { | 340 | switch (cmd) { |
@@ -339,10 +345,10 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
339 | fp->write_command = arg; | 345 | fp->write_command = arg; |
340 | break; | 346 | break; |
341 | case TUBGETI: | 347 | case TUBGETI: |
342 | rc = put_user(fp->read_command, (char __user *) arg); | 348 | rc = put_user(fp->read_command, argp); |
343 | break; | 349 | break; |
344 | case TUBGETO: | 350 | case TUBGETO: |
345 | rc = put_user(fp->write_command,(char __user *) arg); | 351 | rc = put_user(fp->write_command, argp); |
346 | break; | 352 | break; |
347 | case TUBGETMOD: | 353 | case TUBGETMOD: |
348 | iocb.model = fp->view.model; | 354 | iocb.model = fp->view.model; |
@@ -351,8 +357,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
351 | iocb.pf_cnt = 24; | 357 | iocb.pf_cnt = 24; |
352 | iocb.re_cnt = 20; | 358 | iocb.re_cnt = 20; |
353 | iocb.map = 0; | 359 | iocb.map = 0; |
354 | if (copy_to_user((char __user *) arg, &iocb, | 360 | if (copy_to_user(argp, &iocb, sizeof(struct raw3270_iocb))) |
355 | sizeof(struct raw3270_iocb))) | ||
356 | rc = -EFAULT; | 361 | rc = -EFAULT; |
357 | break; | 362 | break; |
358 | } | 363 | } |
@@ -467,7 +472,7 @@ fs3270_open(struct inode *inode, struct file *filp) | |||
467 | if (IS_ERR(ib)) { | 472 | if (IS_ERR(ib)) { |
468 | raw3270_put_view(&fp->view); | 473 | raw3270_put_view(&fp->view); |
469 | raw3270_del_view(&fp->view); | 474 | raw3270_del_view(&fp->view); |
470 | rc = PTR_ERR(fp); | 475 | rc = PTR_ERR(ib); |
471 | goto out; | 476 | goto out; |
472 | } | 477 | } |
473 | fp->rdbuf = ib; | 478 | fp->rdbuf = ib; |
@@ -511,8 +516,8 @@ static const struct file_operations fs3270_fops = { | |||
511 | .write = fs3270_write, /* write */ | 516 | .write = fs3270_write, /* write */ |
512 | .unlocked_ioctl = fs3270_ioctl, /* ioctl */ | 517 | .unlocked_ioctl = fs3270_ioctl, /* ioctl */ |
513 | .compat_ioctl = fs3270_ioctl, /* ioctl */ | 518 | .compat_ioctl = fs3270_ioctl, /* ioctl */ |
514 | .open = fs3270_open, /* open */ | 519 | .open = fs3270_open, /* open */ |
515 | .release = fs3270_close, /* release */ | 520 | .release = fs3270_close, /* release */ |
516 | }; | 521 | }; |
517 | 522 | ||
518 | /* | 523 | /* |
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 60473f86e1f9..33e96484d54f 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c | |||
@@ -529,7 +529,7 @@ static int monreader_restore(struct device *dev) | |||
529 | return monreader_thaw(dev); | 529 | return monreader_thaw(dev); |
530 | } | 530 | } |
531 | 531 | ||
532 | static struct dev_pm_ops monreader_pm_ops = { | 532 | static const struct dev_pm_ops monreader_pm_ops = { |
533 | .freeze = monreader_freeze, | 533 | .freeze = monreader_freeze, |
534 | .thaw = monreader_thaw, | 534 | .thaw = monreader_thaw, |
535 | .restore = monreader_restore, | 535 | .restore = monreader_restore, |
diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c index 6532ed8b4afa..668a0579b26b 100644 --- a/drivers/s390/char/monwriter.c +++ b/drivers/s390/char/monwriter.c | |||
@@ -323,7 +323,7 @@ static int monwriter_thaw(struct device *dev) | |||
323 | return monwriter_restore(dev); | 323 | return monwriter_restore(dev); |
324 | } | 324 | } |
325 | 325 | ||
326 | static struct dev_pm_ops monwriter_pm_ops = { | 326 | static const struct dev_pm_ops monwriter_pm_ops = { |
327 | .freeze = monwriter_freeze, | 327 | .freeze = monwriter_freeze, |
328 | .thaw = monwriter_thaw, | 328 | .thaw = monwriter_thaw, |
329 | .restore = monwriter_restore, | 329 | .restore = monwriter_restore, |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index a983f5086788..ec88c59842e3 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
@@ -1019,7 +1019,7 @@ static int sclp_restore(struct device *dev) | |||
1019 | return sclp_undo_suspend(SCLP_PM_EVENT_RESTORE); | 1019 | return sclp_undo_suspend(SCLP_PM_EVENT_RESTORE); |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | static struct dev_pm_ops sclp_pm_ops = { | 1022 | static const struct dev_pm_ops sclp_pm_ops = { |
1023 | .freeze = sclp_freeze, | 1023 | .freeze = sclp_freeze, |
1024 | .thaw = sclp_thaw, | 1024 | .thaw = sclp_thaw, |
1025 | .restore = sclp_restore, | 1025 | .restore = sclp_restore, |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index 28b5afc129c3..b3beab610da4 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -547,7 +547,7 @@ struct read_storage_sccb { | |||
547 | u32 entries[0]; | 547 | u32 entries[0]; |
548 | } __packed; | 548 | } __packed; |
549 | 549 | ||
550 | static struct dev_pm_ops sclp_mem_pm_ops = { | 550 | static const struct dev_pm_ops sclp_mem_pm_ops = { |
551 | .freeze = sclp_mem_freeze, | 551 | .freeze = sclp_mem_freeze, |
552 | }; | 552 | }; |
553 | 553 | ||
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 3657fe103c27..cb70fa1cf539 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define KMSG_COMPONENT "tape_34xx" | 11 | #define KMSG_COMPONENT "tape_34xx" |
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
12 | 13 | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 0c72aadb8391..9821c5886613 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define KMSG_COMPONENT "tape_3590" | 11 | #define KMSG_COMPONENT "tape_3590" |
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
12 | 13 | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -136,7 +137,7 @@ static void int_to_ext_kekl(struct tape3592_kekl *in, | |||
136 | out->type_on_tape = TAPE390_KEKL_TYPE_LABEL; | 137 | out->type_on_tape = TAPE390_KEKL_TYPE_LABEL; |
137 | memcpy(out->label, in->label, sizeof(in->label)); | 138 | memcpy(out->label, in->label, sizeof(in->label)); |
138 | EBCASC(out->label, sizeof(in->label)); | 139 | EBCASC(out->label, sizeof(in->label)); |
139 | strstrip(out->label); | 140 | strim(out->label); |
140 | } | 141 | } |
141 | 142 | ||
142 | static void int_to_ext_kekl_pair(struct tape3592_kekl_pair *in, | 143 | static void int_to_ext_kekl_pair(struct tape3592_kekl_pair *in, |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 4799cc2f73c3..8d3d720737da 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define KMSG_COMPONENT "tape" | 13 | #define KMSG_COMPONENT "tape" |
14 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
14 | 15 | ||
15 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
@@ -45,8 +46,6 @@ | |||
45 | */ | 46 | */ |
46 | static int tapeblock_open(struct block_device *, fmode_t); | 47 | static int tapeblock_open(struct block_device *, fmode_t); |
47 | static int tapeblock_release(struct gendisk *, fmode_t); | 48 | static int tapeblock_release(struct gendisk *, fmode_t); |
48 | static int tapeblock_ioctl(struct block_device *, fmode_t, unsigned int, | ||
49 | unsigned long); | ||
50 | static int tapeblock_medium_changed(struct gendisk *); | 49 | static int tapeblock_medium_changed(struct gendisk *); |
51 | static int tapeblock_revalidate_disk(struct gendisk *); | 50 | static int tapeblock_revalidate_disk(struct gendisk *); |
52 | 51 | ||
@@ -54,7 +53,6 @@ static const struct block_device_operations tapeblock_fops = { | |||
54 | .owner = THIS_MODULE, | 53 | .owner = THIS_MODULE, |
55 | .open = tapeblock_open, | 54 | .open = tapeblock_open, |
56 | .release = tapeblock_release, | 55 | .release = tapeblock_release, |
57 | .ioctl = tapeblock_ioctl, | ||
58 | .media_changed = tapeblock_medium_changed, | 56 | .media_changed = tapeblock_medium_changed, |
59 | .revalidate_disk = tapeblock_revalidate_disk, | 57 | .revalidate_disk = tapeblock_revalidate_disk, |
60 | }; | 58 | }; |
@@ -415,42 +413,6 @@ tapeblock_release(struct gendisk *disk, fmode_t mode) | |||
415 | } | 413 | } |
416 | 414 | ||
417 | /* | 415 | /* |
418 | * Support of some generic block device IOCTLs. | ||
419 | */ | ||
420 | static int | ||
421 | tapeblock_ioctl( | ||
422 | struct block_device * bdev, | ||
423 | fmode_t mode, | ||
424 | unsigned int command, | ||
425 | unsigned long arg | ||
426 | ) { | ||
427 | int rc; | ||
428 | int minor; | ||
429 | struct gendisk *disk = bdev->bd_disk; | ||
430 | struct tape_device *device; | ||
431 | |||
432 | rc = 0; | ||
433 | BUG_ON(!disk); | ||
434 | device = disk->private_data; | ||
435 | BUG_ON(!device); | ||
436 | minor = MINOR(bdev->bd_dev); | ||
437 | |||
438 | DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command); | ||
439 | DBF_LH(6, "device = %d:%d\n", tapeblock_major, minor); | ||
440 | |||
441 | switch (command) { | ||
442 | /* Refuse some IOCTL calls without complaining (mount). */ | ||
443 | case 0x5310: /* CDROMMULTISESSION */ | ||
444 | rc = -EINVAL; | ||
445 | break; | ||
446 | default: | ||
447 | rc = -EINVAL; | ||
448 | } | ||
449 | |||
450 | return rc; | ||
451 | } | ||
452 | |||
453 | /* | ||
454 | * Initialize block device frontend. | 416 | * Initialize block device frontend. |
455 | */ | 417 | */ |
456 | int | 418 | int |
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index 23d773a0d113..539045acaad4 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c | |||
@@ -10,11 +10,15 @@ | |||
10 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 10 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define KMSG_COMPONENT "tape" | ||
14 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
15 | |||
13 | #include <linux/module.h> | 16 | #include <linux/module.h> |
14 | #include <linux/types.h> | 17 | #include <linux/types.h> |
15 | #include <linux/proc_fs.h> | 18 | #include <linux/proc_fs.h> |
16 | #include <linux/mtio.h> | 19 | #include <linux/mtio.h> |
17 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
21 | #include <linux/compat.h> | ||
18 | 22 | ||
19 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
20 | 24 | ||
@@ -34,8 +38,9 @@ static ssize_t tapechar_write(struct file *, const char __user *, size_t, loff_t | |||
34 | static int tapechar_open(struct inode *,struct file *); | 38 | static int tapechar_open(struct inode *,struct file *); |
35 | static int tapechar_release(struct inode *,struct file *); | 39 | static int tapechar_release(struct inode *,struct file *); |
36 | static long tapechar_ioctl(struct file *, unsigned int, unsigned long); | 40 | static long tapechar_ioctl(struct file *, unsigned int, unsigned long); |
37 | static long tapechar_compat_ioctl(struct file *, unsigned int, | 41 | #ifdef CONFIG_COMPAT |
38 | unsigned long); | 42 | static long tapechar_compat_ioctl(struct file *, unsigned int, unsigned long); |
43 | #endif | ||
39 | 44 | ||
40 | static const struct file_operations tape_fops = | 45 | static const struct file_operations tape_fops = |
41 | { | 46 | { |
@@ -43,7 +48,9 @@ static const struct file_operations tape_fops = | |||
43 | .read = tapechar_read, | 48 | .read = tapechar_read, |
44 | .write = tapechar_write, | 49 | .write = tapechar_write, |
45 | .unlocked_ioctl = tapechar_ioctl, | 50 | .unlocked_ioctl = tapechar_ioctl, |
51 | #ifdef CONFIG_COMPAT | ||
46 | .compat_ioctl = tapechar_compat_ioctl, | 52 | .compat_ioctl = tapechar_compat_ioctl, |
53 | #endif | ||
47 | .open = tapechar_open, | 54 | .open = tapechar_open, |
48 | .release = tapechar_release, | 55 | .release = tapechar_release, |
49 | }; | 56 | }; |
@@ -454,15 +461,22 @@ tapechar_ioctl(struct file *filp, unsigned int no, unsigned long data) | |||
454 | return rc; | 461 | return rc; |
455 | } | 462 | } |
456 | 463 | ||
464 | #ifdef CONFIG_COMPAT | ||
457 | static long | 465 | static long |
458 | tapechar_compat_ioctl(struct file *filp, unsigned int no, unsigned long data) | 466 | tapechar_compat_ioctl(struct file *filp, unsigned int no, unsigned long data) |
459 | { | 467 | { |
460 | struct tape_device *device = filp->private_data; | 468 | struct tape_device *device = filp->private_data; |
461 | int rval = -ENOIOCTLCMD; | 469 | int rval = -ENOIOCTLCMD; |
470 | unsigned long argp; | ||
462 | 471 | ||
472 | /* The 'arg' argument of any ioctl function may only be used for | ||
473 | * pointers because of the compat pointer conversion. | ||
474 | * Consider this when adding new ioctls. | ||
475 | */ | ||
476 | argp = (unsigned long) compat_ptr(data); | ||
463 | if (device->discipline->ioctl_fn) { | 477 | if (device->discipline->ioctl_fn) { |
464 | mutex_lock(&device->mutex); | 478 | mutex_lock(&device->mutex); |
465 | rval = device->discipline->ioctl_fn(device, no, data); | 479 | rval = device->discipline->ioctl_fn(device, no, argp); |
466 | mutex_unlock(&device->mutex); | 480 | mutex_unlock(&device->mutex); |
467 | if (rval == -EINVAL) | 481 | if (rval == -EINVAL) |
468 | rval = -ENOIOCTLCMD; | 482 | rval = -ENOIOCTLCMD; |
@@ -470,6 +484,7 @@ tapechar_compat_ioctl(struct file *filp, unsigned int no, unsigned long data) | |||
470 | 484 | ||
471 | return rval; | 485 | return rval; |
472 | } | 486 | } |
487 | #endif /* CONFIG_COMPAT */ | ||
473 | 488 | ||
474 | /* | 489 | /* |
475 | * Initialize character device frontend. | 490 | * Initialize character device frontend. |
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index ddc914ccea8f..b2864e3edb6d 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
@@ -7,6 +7,10 @@ | |||
7 | * Author: Stefan Bader <shbader@de.ibm.com> | 7 | * Author: Stefan Bader <shbader@de.ibm.com> |
8 | * Based on simple class device code by Greg K-H | 8 | * Based on simple class device code by Greg K-H |
9 | */ | 9 | */ |
10 | |||
11 | #define KMSG_COMPONENT "tape" | ||
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
13 | |||
10 | #include "tape_class.h" | 14 | #include "tape_class.h" |
11 | 15 | ||
12 | MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>"); | 16 | MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>"); |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index f5d6802dc5da..81b094e480e6 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -12,6 +12,8 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "tape" | 14 | #define KMSG_COMPONENT "tape" |
15 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
16 | |||
15 | #include <linux/module.h> | 17 | #include <linux/module.h> |
16 | #include <linux/init.h> // for kernel parameters | 18 | #include <linux/init.h> // for kernel parameters |
17 | #include <linux/kmod.h> // for requesting modules | 19 | #include <linux/kmod.h> // for requesting modules |
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c index ebd820ccfb24..0ceb37984f77 100644 --- a/drivers/s390/char/tape_proc.c +++ b/drivers/s390/char/tape_proc.c | |||
@@ -11,6 +11,9 @@ | |||
11 | * PROCFS Functions | 11 | * PROCFS Functions |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "tape" | ||
15 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
16 | |||
14 | #include <linux/module.h> | 17 | #include <linux/module.h> |
15 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
16 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 750354ad16e5..03f07e5dd6e9 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c | |||
@@ -11,6 +11,9 @@ | |||
11 | * Stefan Bader <shbader@de.ibm.com> | 11 | * Stefan Bader <shbader@de.ibm.com> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "tape" | ||
15 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
16 | |||
14 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
15 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
16 | #include <linux/bio.h> | 19 | #include <linux/bio.h> |
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index a6087cec55b4..921dcda77676 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <asm/compat.h> | ||
22 | #include <asm/cpcmd.h> | 23 | #include <asm/cpcmd.h> |
23 | #include <asm/debug.h> | 24 | #include <asm/debug.h> |
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
@@ -139,21 +140,26 @@ vmcp_write(struct file *file, const char __user *buff, size_t count, | |||
139 | static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 140 | static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
140 | { | 141 | { |
141 | struct vmcp_session *session; | 142 | struct vmcp_session *session; |
143 | int __user *argp; | ||
142 | int temp; | 144 | int temp; |
143 | 145 | ||
144 | session = (struct vmcp_session *)file->private_data; | 146 | session = (struct vmcp_session *)file->private_data; |
147 | if (is_compat_task()) | ||
148 | argp = compat_ptr(arg); | ||
149 | else | ||
150 | argp = (int __user *)arg; | ||
145 | if (mutex_lock_interruptible(&session->mutex)) | 151 | if (mutex_lock_interruptible(&session->mutex)) |
146 | return -ERESTARTSYS; | 152 | return -ERESTARTSYS; |
147 | switch (cmd) { | 153 | switch (cmd) { |
148 | case VMCP_GETCODE: | 154 | case VMCP_GETCODE: |
149 | temp = session->resp_code; | 155 | temp = session->resp_code; |
150 | mutex_unlock(&session->mutex); | 156 | mutex_unlock(&session->mutex); |
151 | return put_user(temp, (int __user *)arg); | 157 | return put_user(temp, argp); |
152 | case VMCP_SETBUF: | 158 | case VMCP_SETBUF: |
153 | free_pages((unsigned long)session->response, | 159 | free_pages((unsigned long)session->response, |
154 | get_order(session->bufsize)); | 160 | get_order(session->bufsize)); |
155 | session->response=NULL; | 161 | session->response=NULL; |
156 | temp = get_user(session->bufsize, (int __user *)arg); | 162 | temp = get_user(session->bufsize, argp); |
157 | if (get_order(session->bufsize) > 8) { | 163 | if (get_order(session->bufsize) > 8) { |
158 | session->bufsize = PAGE_SIZE; | 164 | session->bufsize = PAGE_SIZE; |
159 | temp = -EINVAL; | 165 | temp = -EINVAL; |
@@ -163,7 +169,7 @@ static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
163 | case VMCP_GETSIZE: | 169 | case VMCP_GETSIZE: |
164 | temp = session->resp_size; | 170 | temp = session->resp_size; |
165 | mutex_unlock(&session->mutex); | 171 | mutex_unlock(&session->mutex); |
166 | return put_user(temp, (int __user *)arg); | 172 | return put_user(temp, argp); |
167 | default: | 173 | default: |
168 | mutex_unlock(&session->mutex); | 174 | mutex_unlock(&session->mutex); |
169 | return -ENOIOCTLCMD; | 175 | return -ENOIOCTLCMD; |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 899aa795bf38..7dfa5412d5a8 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -675,7 +675,7 @@ static int vmlogrdr_pm_prepare(struct device *dev) | |||
675 | } | 675 | } |
676 | 676 | ||
677 | 677 | ||
678 | static struct dev_pm_ops vmlogrdr_pm_ops = { | 678 | static const struct dev_pm_ops vmlogrdr_pm_ops = { |
679 | .prepare = vmlogrdr_pm_prepare, | 679 | .prepare = vmlogrdr_pm_prepare, |
680 | }; | 680 | }; |
681 | 681 | ||