diff options
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/con3215.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/ctrlchar.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/defkeymap.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/fs3270.c | 12 | ||||
-rw-r--r-- | drivers/s390/char/keyboard.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/raw3270.c | 86 | ||||
-rw-r--r-- | drivers/s390/char/raw3270.h | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/tape_class.c | 10 | ||||
-rw-r--r-- | drivers/s390/char/tape_core.c | 18 | ||||
-rw-r--r-- | drivers/s390/char/tty3270.c | 24 | ||||
-rw-r--r-- | drivers/s390/char/vmlogrdr.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/vmwatchdog.c | 2 |
13 files changed, 106 insertions, 76 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index f25c6d116f6f..2fa566fa6da4 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -693,7 +693,7 @@ raw3215_probe (struct ccw_device *cdev) | |||
693 | GFP_KERNEL|GFP_DMA); | 693 | GFP_KERNEL|GFP_DMA); |
694 | if (raw->buffer == NULL) { | 694 | if (raw->buffer == NULL) { |
695 | spin_lock(&raw3215_device_lock); | 695 | spin_lock(&raw3215_device_lock); |
696 | raw3215[line] = 0; | 696 | raw3215[line] = NULL; |
697 | spin_unlock(&raw3215_device_lock); | 697 | spin_unlock(&raw3215_device_lock); |
698 | kfree(raw); | 698 | kfree(raw); |
699 | return -ENOMEM; | 699 | return -ENOMEM; |
diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c index 0ea6f36a2527..d83eb6358bac 100644 --- a/drivers/s390/char/ctrlchar.c +++ b/drivers/s390/char/ctrlchar.c | |||
@@ -23,7 +23,7 @@ ctrlchar_handle_sysrq(void *tty) | |||
23 | handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty); | 23 | handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty); |
24 | } | 24 | } |
25 | 25 | ||
26 | static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, 0); | 26 | static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL); |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | 29 | ||
diff --git a/drivers/s390/char/defkeymap.c b/drivers/s390/char/defkeymap.c index ca15adb140d1..17027d918cf7 100644 --- a/drivers/s390/char/defkeymap.c +++ b/drivers/s390/char/defkeymap.c | |||
@@ -83,8 +83,8 @@ static u_short shift_ctrl_map[NR_KEYS] = { | |||
83 | }; | 83 | }; |
84 | 84 | ||
85 | ushort *key_maps[MAX_NR_KEYMAPS] = { | 85 | ushort *key_maps[MAX_NR_KEYMAPS] = { |
86 | plain_map, shift_map, 0, 0, | 86 | plain_map, shift_map, NULL, NULL, |
87 | ctrl_map, shift_ctrl_map, 0 | 87 | ctrl_map, shift_ctrl_map, NULL, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | unsigned int keymap_count = 4; | 90 | unsigned int keymap_count = 4; |
@@ -145,7 +145,7 @@ char *func_table[MAX_NR_FUNC] = { | |||
145 | func_buf + 97, | 145 | func_buf + 97, |
146 | func_buf + 103, | 146 | func_buf + 103, |
147 | func_buf + 109, | 147 | func_buf + 109, |
148 | 0, | 148 | NULL, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | struct kbdiacr accent_table[MAX_DIACR] = { | 151 | struct kbdiacr accent_table[MAX_DIACR] = { |
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 6099c14de429..ef004d089712 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -236,7 +236,7 @@ fs3270_irq(struct fs3270 *fp, struct raw3270_request *rq, struct irb *irb) | |||
236 | * Process reads from fullscreen 3270. | 236 | * Process reads from fullscreen 3270. |
237 | */ | 237 | */ |
238 | static ssize_t | 238 | static ssize_t |
239 | fs3270_read(struct file *filp, char *data, size_t count, loff_t *off) | 239 | fs3270_read(struct file *filp, char __user *data, size_t count, loff_t *off) |
240 | { | 240 | { |
241 | struct fs3270 *fp; | 241 | struct fs3270 *fp; |
242 | struct raw3270_request *rq; | 242 | struct raw3270_request *rq; |
@@ -281,7 +281,7 @@ fs3270_read(struct file *filp, char *data, size_t count, loff_t *off) | |||
281 | * Process writes to fullscreen 3270. | 281 | * Process writes to fullscreen 3270. |
282 | */ | 282 | */ |
283 | static ssize_t | 283 | static ssize_t |
284 | fs3270_write(struct file *filp, const char *data, size_t count, loff_t *off) | 284 | fs3270_write(struct file *filp, const char __user *data, size_t count, loff_t *off) |
285 | { | 285 | { |
286 | struct fs3270 *fp; | 286 | struct fs3270 *fp; |
287 | struct raw3270_request *rq; | 287 | struct raw3270_request *rq; |
@@ -338,10 +338,10 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
338 | fp->write_command = arg; | 338 | fp->write_command = arg; |
339 | break; | 339 | break; |
340 | case TUBGETI: | 340 | case TUBGETI: |
341 | rc = put_user(fp->read_command, (char *) arg); | 341 | rc = put_user(fp->read_command, (char __user *) arg); |
342 | break; | 342 | break; |
343 | case TUBGETO: | 343 | case TUBGETO: |
344 | rc = put_user(fp->write_command,(char *) arg); | 344 | rc = put_user(fp->write_command,(char __user *) arg); |
345 | break; | 345 | break; |
346 | case TUBGETMOD: | 346 | case TUBGETMOD: |
347 | iocb.model = fp->view.model; | 347 | iocb.model = fp->view.model; |
@@ -350,7 +350,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
350 | iocb.pf_cnt = 24; | 350 | iocb.pf_cnt = 24; |
351 | iocb.re_cnt = 20; | 351 | iocb.re_cnt = 20; |
352 | iocb.map = 0; | 352 | iocb.map = 0; |
353 | if (copy_to_user((char *) arg, &iocb, | 353 | if (copy_to_user((char __user *) arg, &iocb, |
354 | sizeof(struct raw3270_iocb))) | 354 | sizeof(struct raw3270_iocb))) |
355 | rc = -EFAULT; | 355 | rc = -EFAULT; |
356 | break; | 356 | break; |
@@ -479,7 +479,7 @@ fs3270_close(struct inode *inode, struct file *filp) | |||
479 | struct fs3270 *fp; | 479 | struct fs3270 *fp; |
480 | 480 | ||
481 | fp = filp->private_data; | 481 | fp = filp->private_data; |
482 | filp->private_data = 0; | 482 | filp->private_data = NULL; |
483 | if (fp) { | 483 | if (fp) { |
484 | fp->fs_pid = 0; | 484 | fp->fs_pid = 0; |
485 | raw3270_reset(&fp->view); | 485 | raw3270_reset(&fp->view); |
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 547ef906ae2c..3be06569180d 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c | |||
@@ -103,7 +103,7 @@ out_maps: | |||
103 | out_kbd: | 103 | out_kbd: |
104 | kfree(kbd); | 104 | kfree(kbd); |
105 | out: | 105 | out: |
106 | return 0; | 106 | return NULL; |
107 | } | 107 | } |
108 | 108 | ||
109 | void | 109 | void |
@@ -304,7 +304,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode) | |||
304 | if (kbd->sysrq) { | 304 | if (kbd->sysrq) { |
305 | if (kbd->sysrq == K(KT_LATIN, '-')) { | 305 | if (kbd->sysrq == K(KT_LATIN, '-')) { |
306 | kbd->sysrq = 0; | 306 | kbd->sysrq = 0; |
307 | handle_sysrq(value, 0, kbd->tty); | 307 | handle_sysrq(value, NULL, kbd->tty); |
308 | return; | 308 | return; |
309 | } | 309 | } |
310 | if (value == '-') { | 310 | if (value == '-') { |
@@ -363,7 +363,7 @@ do_kdsk_ioctl(struct kbd_data *kbd, struct kbentry __user *user_kbe, | |||
363 | /* disallocate map */ | 363 | /* disallocate map */ |
364 | key_map = kbd->key_maps[tmp.kb_table]; | 364 | key_map = kbd->key_maps[tmp.kb_table]; |
365 | if (key_map) { | 365 | if (key_map) { |
366 | kbd->key_maps[tmp.kb_table] = 0; | 366 | kbd->key_maps[tmp.kb_table] = NULL; |
367 | kfree(key_map); | 367 | kfree(key_map); |
368 | } | 368 | } |
369 | break; | 369 | break; |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index e95b56f810db..7a84014f2037 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -555,7 +555,7 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, | |||
555 | #ifdef CONFIG_TN3270_CONSOLE | 555 | #ifdef CONFIG_TN3270_CONSOLE |
556 | if (raw3270_registered == 0) { | 556 | if (raw3270_registered == 0) { |
557 | spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); | 557 | spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); |
558 | rq->callback = 0; | 558 | rq->callback = NULL; |
559 | rc = __raw3270_start(rp, view, rq); | 559 | rc = __raw3270_start(rp, view, rq); |
560 | if (rc == 0) | 560 | if (rc == 0) |
561 | while (!raw3270_request_final(rq)) { | 561 | while (!raw3270_request_final(rq)) { |
@@ -719,8 +719,8 @@ raw3270_size_device(struct raw3270 *rp) | |||
719 | rc = __raw3270_size_device_vm(rp); | 719 | rc = __raw3270_size_device_vm(rp); |
720 | else | 720 | else |
721 | rc = __raw3270_size_device(rp); | 721 | rc = __raw3270_size_device(rp); |
722 | raw3270_init_view.dev = 0; | 722 | raw3270_init_view.dev = NULL; |
723 | rp->view = 0; | 723 | rp->view = NULL; |
724 | up(&raw3270_init_sem); | 724 | up(&raw3270_init_sem); |
725 | if (rc == 0) { /* Found something. */ | 725 | if (rc == 0) { /* Found something. */ |
726 | /* Try to find a model. */ | 726 | /* Try to find a model. */ |
@@ -761,8 +761,8 @@ raw3270_reset_device(struct raw3270 *rp) | |||
761 | rp->view = &raw3270_init_view; | 761 | rp->view = &raw3270_init_view; |
762 | raw3270_init_view.dev = rp; | 762 | raw3270_init_view.dev = rp; |
763 | rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request); | 763 | rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request); |
764 | raw3270_init_view.dev = 0; | 764 | raw3270_init_view.dev = NULL; |
765 | rp->view = 0; | 765 | rp->view = NULL; |
766 | up(&raw3270_init_sem); | 766 | up(&raw3270_init_sem); |
767 | return rc; | 767 | return rc; |
768 | } | 768 | } |
@@ -934,7 +934,7 @@ raw3270_activate_view(struct raw3270_view *view) | |||
934 | else if (!test_bit(RAW3270_FLAGS_READY, &rp->flags)) | 934 | else if (!test_bit(RAW3270_FLAGS_READY, &rp->flags)) |
935 | rc = -ENODEV; | 935 | rc = -ENODEV; |
936 | else { | 936 | else { |
937 | oldview = 0; | 937 | oldview = NULL; |
938 | if (rp->view) { | 938 | if (rp->view) { |
939 | oldview = rp->view; | 939 | oldview = rp->view; |
940 | oldview->fn->deactivate(oldview); | 940 | oldview->fn->deactivate(oldview); |
@@ -951,7 +951,7 @@ raw3270_activate_view(struct raw3270_view *view) | |||
951 | rp->view = nv; | 951 | rp->view = nv; |
952 | if (nv->fn->activate(nv) == 0) | 952 | if (nv->fn->activate(nv) == 0) |
953 | break; | 953 | break; |
954 | rp->view = 0; | 954 | rp->view = NULL; |
955 | } | 955 | } |
956 | } | 956 | } |
957 | } | 957 | } |
@@ -975,7 +975,7 @@ raw3270_deactivate_view(struct raw3270_view *view) | |||
975 | spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); | 975 | spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); |
976 | if (rp->view == view) { | 976 | if (rp->view == view) { |
977 | view->fn->deactivate(view); | 977 | view->fn->deactivate(view); |
978 | rp->view = 0; | 978 | rp->view = NULL; |
979 | /* Move deactivated view to end of list. */ | 979 | /* Move deactivated view to end of list. */ |
980 | list_del_init(&view->list); | 980 | list_del_init(&view->list); |
981 | list_add_tail(&view->list, &rp->view_list); | 981 | list_add_tail(&view->list, &rp->view_list); |
@@ -985,7 +985,7 @@ raw3270_deactivate_view(struct raw3270_view *view) | |||
985 | rp->view = view; | 985 | rp->view = view; |
986 | if (view->fn->activate(view) == 0) | 986 | if (view->fn->activate(view) == 0) |
987 | break; | 987 | break; |
988 | rp->view = 0; | 988 | rp->view = NULL; |
989 | } | 989 | } |
990 | } | 990 | } |
991 | } | 991 | } |
@@ -1076,7 +1076,7 @@ raw3270_del_view(struct raw3270_view *view) | |||
1076 | spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); | 1076 | spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); |
1077 | if (rp->view == view) { | 1077 | if (rp->view == view) { |
1078 | view->fn->deactivate(view); | 1078 | view->fn->deactivate(view); |
1079 | rp->view = 0; | 1079 | rp->view = NULL; |
1080 | } | 1080 | } |
1081 | list_del_init(&view->list); | 1081 | list_del_init(&view->list); |
1082 | if (!rp->view && test_bit(RAW3270_FLAGS_READY, &rp->flags)) { | 1082 | if (!rp->view && test_bit(RAW3270_FLAGS_READY, &rp->flags)) { |
@@ -1106,10 +1106,10 @@ raw3270_delete_device(struct raw3270 *rp) | |||
1106 | 1106 | ||
1107 | /* Remove from device chain. */ | 1107 | /* Remove from device chain. */ |
1108 | mutex_lock(&raw3270_mutex); | 1108 | mutex_lock(&raw3270_mutex); |
1109 | if (rp->clttydev) | 1109 | if (rp->clttydev && !IS_ERR(rp->clttydev)) |
1110 | class_device_destroy(class3270, | 1110 | class_device_destroy(class3270, |
1111 | MKDEV(IBM_TTY3270_MAJOR, rp->minor)); | 1111 | MKDEV(IBM_TTY3270_MAJOR, rp->minor)); |
1112 | if (rp->cltubdev) | 1112 | if (rp->cltubdev && !IS_ERR(rp->cltubdev)) |
1113 | class_device_destroy(class3270, | 1113 | class_device_destroy(class3270, |
1114 | MKDEV(IBM_FS3270_MAJOR, rp->minor)); | 1114 | MKDEV(IBM_FS3270_MAJOR, rp->minor)); |
1115 | list_del_init(&rp->list); | 1115 | list_del_init(&rp->list); |
@@ -1117,9 +1117,9 @@ raw3270_delete_device(struct raw3270 *rp) | |||
1117 | 1117 | ||
1118 | /* Disconnect from ccw_device. */ | 1118 | /* Disconnect from ccw_device. */ |
1119 | cdev = rp->cdev; | 1119 | cdev = rp->cdev; |
1120 | rp->cdev = 0; | 1120 | rp->cdev = NULL; |
1121 | cdev->dev.driver_data = 0; | 1121 | cdev->dev.driver_data = NULL; |
1122 | cdev->handler = 0; | 1122 | cdev->handler = NULL; |
1123 | 1123 | ||
1124 | /* Put ccw_device structure. */ | 1124 | /* Put ccw_device structure. */ |
1125 | put_device(&cdev->dev); | 1125 | put_device(&cdev->dev); |
@@ -1144,7 +1144,7 @@ raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
1144 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1144 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1145 | ((struct raw3270 *) dev->driver_data)->model); | 1145 | ((struct raw3270 *) dev->driver_data)->model); |
1146 | } | 1146 | } |
1147 | static DEVICE_ATTR(model, 0444, raw3270_model_show, 0); | 1147 | static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); |
1148 | 1148 | ||
1149 | static ssize_t | 1149 | static ssize_t |
1150 | raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) | 1150 | raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -1152,7 +1152,7 @@ raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
1152 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1152 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1153 | ((struct raw3270 *) dev->driver_data)->rows); | 1153 | ((struct raw3270 *) dev->driver_data)->rows); |
1154 | } | 1154 | } |
1155 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, 0); | 1155 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); |
1156 | 1156 | ||
1157 | static ssize_t | 1157 | static ssize_t |
1158 | raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) | 1158 | raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -1160,7 +1160,7 @@ raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *bu | |||
1160 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1160 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1161 | ((struct raw3270 *) dev->driver_data)->cols); | 1161 | ((struct raw3270 *) dev->driver_data)->cols); |
1162 | } | 1162 | } |
1163 | static DEVICE_ATTR(columns, 0444, raw3270_columns_show, 0); | 1163 | static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); |
1164 | 1164 | ||
1165 | static struct attribute * raw3270_attrs[] = { | 1165 | static struct attribute * raw3270_attrs[] = { |
1166 | &dev_attr_model.attr, | 1166 | &dev_attr_model.attr, |
@@ -1173,21 +1173,37 @@ static struct attribute_group raw3270_attr_group = { | |||
1173 | .attrs = raw3270_attrs, | 1173 | .attrs = raw3270_attrs, |
1174 | }; | 1174 | }; |
1175 | 1175 | ||
1176 | static void | 1176 | static int raw3270_create_attributes(struct raw3270 *rp) |
1177 | raw3270_create_attributes(struct raw3270 *rp) | ||
1178 | { | 1177 | { |
1179 | //FIXME: check return code | 1178 | int rc; |
1180 | sysfs_create_group(&rp->cdev->dev.kobj, &raw3270_attr_group); | 1179 | |
1181 | rp->clttydev = | 1180 | rc = sysfs_create_group(&rp->cdev->dev.kobj, &raw3270_attr_group); |
1182 | class_device_create(class3270, NULL, | 1181 | if (rc) |
1183 | MKDEV(IBM_TTY3270_MAJOR, rp->minor), | 1182 | goto out; |
1184 | &rp->cdev->dev, "tty%s", | 1183 | |
1185 | rp->cdev->dev.bus_id); | 1184 | rp->clttydev = class_device_create(class3270, NULL, |
1186 | rp->cltubdev = | 1185 | MKDEV(IBM_TTY3270_MAJOR, rp->minor), |
1187 | class_device_create(class3270, NULL, | 1186 | &rp->cdev->dev, "tty%s", |
1188 | MKDEV(IBM_FS3270_MAJOR, rp->minor), | 1187 | rp->cdev->dev.bus_id); |
1189 | &rp->cdev->dev, "tub%s", | 1188 | if (IS_ERR(rp->clttydev)) { |
1190 | rp->cdev->dev.bus_id); | 1189 | rc = PTR_ERR(rp->clttydev); |
1190 | goto out_ttydev; | ||
1191 | } | ||
1192 | |||
1193 | rp->cltubdev = class_device_create(class3270, NULL, | ||
1194 | MKDEV(IBM_FS3270_MAJOR, rp->minor), | ||
1195 | &rp->cdev->dev, "tub%s", | ||
1196 | rp->cdev->dev.bus_id); | ||
1197 | if (!IS_ERR(rp->cltubdev)) | ||
1198 | goto out; | ||
1199 | |||
1200 | rc = PTR_ERR(rp->cltubdev); | ||
1201 | class_device_destroy(class3270, MKDEV(IBM_TTY3270_MAJOR, rp->minor)); | ||
1202 | |||
1203 | out_ttydev: | ||
1204 | sysfs_remove_group(&rp->cdev->dev.kobj, &raw3270_attr_group); | ||
1205 | out: | ||
1206 | return rc; | ||
1191 | } | 1207 | } |
1192 | 1208 | ||
1193 | /* | 1209 | /* |
@@ -1255,7 +1271,9 @@ raw3270_set_online (struct ccw_device *cdev) | |||
1255 | rc = raw3270_reset_device(rp); | 1271 | rc = raw3270_reset_device(rp); |
1256 | if (rc) | 1272 | if (rc) |
1257 | goto failure; | 1273 | goto failure; |
1258 | raw3270_create_attributes(rp); | 1274 | rc = raw3270_create_attributes(rp); |
1275 | if (rc) | ||
1276 | goto failure; | ||
1259 | set_bit(RAW3270_FLAGS_READY, &rp->flags); | 1277 | set_bit(RAW3270_FLAGS_READY, &rp->flags); |
1260 | mutex_lock(&raw3270_mutex); | 1278 | mutex_lock(&raw3270_mutex); |
1261 | list_for_each_entry(np, &raw3270_notifier, list) | 1279 | list_for_each_entry(np, &raw3270_notifier, list) |
@@ -1296,7 +1314,7 @@ raw3270_remove (struct ccw_device *cdev) | |||
1296 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); | 1314 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); |
1297 | if (rp->view) { | 1315 | if (rp->view) { |
1298 | rp->view->fn->deactivate(rp->view); | 1316 | rp->view->fn->deactivate(rp->view); |
1299 | rp->view = 0; | 1317 | rp->view = NULL; |
1300 | } | 1318 | } |
1301 | while (!list_empty(&rp->view_list)) { | 1319 | while (!list_empty(&rp->view_list)) { |
1302 | v = list_entry(rp->view_list.next, struct raw3270_view, list); | 1320 | v = list_entry(rp->view_list.next, struct raw3270_view, list); |
diff --git a/drivers/s390/char/raw3270.h b/drivers/s390/char/raw3270.h index b635bf8e7775..90beaa80a782 100644 --- a/drivers/s390/char/raw3270.h +++ b/drivers/s390/char/raw3270.h | |||
@@ -231,7 +231,7 @@ alloc_string(struct list_head *free_list, unsigned long len) | |||
231 | INIT_LIST_HEAD(&cs->update); | 231 | INIT_LIST_HEAD(&cs->update); |
232 | return cs; | 232 | return cs; |
233 | } | 233 | } |
234 | return 0; | 234 | return NULL; |
235 | } | 235 | } |
236 | 236 | ||
237 | static inline unsigned long | 237 | static inline unsigned long |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 48b4d30a7256..7b95dab913d0 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -1309,9 +1309,9 @@ static struct tape_discipline tape_discipline_34xx = { | |||
1309 | }; | 1309 | }; |
1310 | 1310 | ||
1311 | static struct ccw_device_id tape_34xx_ids[] = { | 1311 | static struct ccw_device_id tape_34xx_ids[] = { |
1312 | { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), driver_info: tape_3480}, | 1312 | { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), .driver_info = tape_3480}, |
1313 | { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), driver_info: tape_3490}, | 1313 | { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490}, |
1314 | { /* end of list */ } | 1314 | { /* end of list */ }, |
1315 | }; | 1315 | }; |
1316 | 1316 | ||
1317 | static int | 1317 | static int |
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index a5c68e60fcf4..643b6d078563 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
@@ -76,14 +76,22 @@ struct tape_class_device *register_tape_dev( | |||
76 | device, | 76 | device, |
77 | "%s", tcd->device_name | 77 | "%s", tcd->device_name |
78 | ); | 78 | ); |
79 | sysfs_create_link( | 79 | rc = PTR_ERR(tcd->class_device); |
80 | if (rc) | ||
81 | goto fail_with_cdev; | ||
82 | rc = sysfs_create_link( | ||
80 | &device->kobj, | 83 | &device->kobj, |
81 | &tcd->class_device->kobj, | 84 | &tcd->class_device->kobj, |
82 | tcd->mode_name | 85 | tcd->mode_name |
83 | ); | 86 | ); |
87 | if (rc) | ||
88 | goto fail_with_class_device; | ||
84 | 89 | ||
85 | return tcd; | 90 | return tcd; |
86 | 91 | ||
92 | fail_with_class_device: | ||
93 | class_device_destroy(tape_class, tcd->char_device->dev); | ||
94 | |||
87 | fail_with_cdev: | 95 | fail_with_cdev: |
88 | cdev_del(tcd->char_device); | 96 | cdev_del(tcd->char_device); |
89 | 97 | ||
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 122b4d8965c3..2826aed91043 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -543,20 +543,24 @@ int | |||
543 | tape_generic_probe(struct ccw_device *cdev) | 543 | tape_generic_probe(struct ccw_device *cdev) |
544 | { | 544 | { |
545 | struct tape_device *device; | 545 | struct tape_device *device; |
546 | int ret; | ||
546 | 547 | ||
547 | device = tape_alloc_device(); | 548 | device = tape_alloc_device(); |
548 | if (IS_ERR(device)) | 549 | if (IS_ERR(device)) |
549 | return -ENODEV; | 550 | return -ENODEV; |
550 | PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); | 551 | ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); |
552 | ret = sysfs_create_group(&cdev->dev.kobj, &tape_attr_group); | ||
553 | if (ret) { | ||
554 | tape_put_device(device); | ||
555 | PRINT_ERR("probe failed for tape device %s\n", cdev->dev.bus_id); | ||
556 | return ret; | ||
557 | } | ||
551 | cdev->dev.driver_data = device; | 558 | cdev->dev.driver_data = device; |
559 | cdev->handler = __tape_do_irq; | ||
552 | device->cdev = cdev; | 560 | device->cdev = cdev; |
553 | device->cdev_id = busid_to_int(cdev->dev.bus_id); | 561 | device->cdev_id = busid_to_int(cdev->dev.bus_id); |
554 | cdev->handler = __tape_do_irq; | 562 | PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); |
555 | 563 | return ret; | |
556 | ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); | ||
557 | sysfs_create_group(&cdev->dev.kobj, &tape_attr_group); | ||
558 | |||
559 | return 0; | ||
560 | } | 564 | } |
561 | 565 | ||
562 | static inline void | 566 | static inline void |
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index f496f236b9c0..29718042c6c9 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
@@ -437,7 +437,7 @@ tty3270_rcl_add(struct tty3270 *tp, char *input, int len) | |||
437 | { | 437 | { |
438 | struct string *s; | 438 | struct string *s; |
439 | 439 | ||
440 | tp->rcl_walk = 0; | 440 | tp->rcl_walk = NULL; |
441 | if (len <= 0) | 441 | if (len <= 0) |
442 | return; | 442 | return; |
443 | if (tp->rcl_nr >= tp->rcl_max) { | 443 | if (tp->rcl_nr >= tp->rcl_max) { |
@@ -466,12 +466,12 @@ tty3270_rcl_backward(struct kbd_data *kbd) | |||
466 | else if (!list_empty(&tp->rcl_lines)) | 466 | else if (!list_empty(&tp->rcl_lines)) |
467 | tp->rcl_walk = tp->rcl_lines.prev; | 467 | tp->rcl_walk = tp->rcl_lines.prev; |
468 | s = tp->rcl_walk ? | 468 | s = tp->rcl_walk ? |
469 | list_entry(tp->rcl_walk, struct string, list) : 0; | 469 | list_entry(tp->rcl_walk, struct string, list) : NULL; |
470 | if (tp->rcl_walk) { | 470 | if (tp->rcl_walk) { |
471 | s = list_entry(tp->rcl_walk, struct string, list); | 471 | s = list_entry(tp->rcl_walk, struct string, list); |
472 | tty3270_update_prompt(tp, s->string, s->len); | 472 | tty3270_update_prompt(tp, s->string, s->len); |
473 | } else | 473 | } else |
474 | tty3270_update_prompt(tp, 0, 0); | 474 | tty3270_update_prompt(tp, NULL, 0); |
475 | tty3270_set_timer(tp, 1); | 475 | tty3270_set_timer(tp, 1); |
476 | } | 476 | } |
477 | spin_unlock_bh(&tp->view.lock); | 477 | spin_unlock_bh(&tp->view.lock); |
@@ -553,7 +553,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq) | |||
553 | * has to be emitted to the tty and for 0x6d the screen | 553 | * has to be emitted to the tty and for 0x6d the screen |
554 | * needs to be redrawn. | 554 | * needs to be redrawn. |
555 | */ | 555 | */ |
556 | input = 0; | 556 | input = NULL; |
557 | len = 0; | 557 | len = 0; |
558 | if (tp->input->string[0] == 0x7d) { | 558 | if (tp->input->string[0] == 0x7d) { |
559 | /* Enter: write input to tty. */ | 559 | /* Enter: write input to tty. */ |
@@ -567,7 +567,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq) | |||
567 | tty3270_update_status(tp); | 567 | tty3270_update_status(tp); |
568 | } | 568 | } |
569 | /* Clear input area. */ | 569 | /* Clear input area. */ |
570 | tty3270_update_prompt(tp, 0, 0); | 570 | tty3270_update_prompt(tp, NULL, 0); |
571 | tty3270_set_timer(tp, 1); | 571 | tty3270_set_timer(tp, 1); |
572 | } else if (tp->input->string[0] == 0x6d) { | 572 | } else if (tp->input->string[0] == 0x6d) { |
573 | /* Display has been cleared. Redraw. */ | 573 | /* Display has been cleared. Redraw. */ |
@@ -808,8 +808,8 @@ tty3270_release(struct raw3270_view *view) | |||
808 | tp = (struct tty3270 *) view; | 808 | tp = (struct tty3270 *) view; |
809 | tty = tp->tty; | 809 | tty = tp->tty; |
810 | if (tty) { | 810 | if (tty) { |
811 | tty->driver_data = 0; | 811 | tty->driver_data = NULL; |
812 | tp->tty = tp->kbd->tty = 0; | 812 | tp->tty = tp->kbd->tty = NULL; |
813 | tty_hangup(tty); | 813 | tty_hangup(tty); |
814 | raw3270_put_view(&tp->view); | 814 | raw3270_put_view(&tp->view); |
815 | } | 815 | } |
@@ -948,8 +948,8 @@ tty3270_close(struct tty_struct *tty, struct file * filp) | |||
948 | return; | 948 | return; |
949 | tp = (struct tty3270 *) tty->driver_data; | 949 | tp = (struct tty3270 *) tty->driver_data; |
950 | if (tp) { | 950 | if (tp) { |
951 | tty->driver_data = 0; | 951 | tty->driver_data = NULL; |
952 | tp->tty = tp->kbd->tty = 0; | 952 | tp->tty = tp->kbd->tty = NULL; |
953 | raw3270_put_view(&tp->view); | 953 | raw3270_put_view(&tp->view); |
954 | } | 954 | } |
955 | } | 955 | } |
@@ -1673,7 +1673,7 @@ tty3270_set_termios(struct tty_struct *tty, struct termios *old) | |||
1673 | new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN; | 1673 | new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN; |
1674 | if (new != tp->inattr) { | 1674 | if (new != tp->inattr) { |
1675 | tp->inattr = new; | 1675 | tp->inattr = new; |
1676 | tty3270_update_prompt(tp, 0, 0); | 1676 | tty3270_update_prompt(tp, NULL, 0); |
1677 | tty3270_set_timer(tp, 1); | 1677 | tty3270_set_timer(tp, 1); |
1678 | } | 1678 | } |
1679 | } | 1679 | } |
@@ -1759,7 +1759,7 @@ void | |||
1759 | tty3270_notifier(int index, int active) | 1759 | tty3270_notifier(int index, int active) |
1760 | { | 1760 | { |
1761 | if (active) | 1761 | if (active) |
1762 | tty_register_device(tty3270_driver, index, 0); | 1762 | tty_register_device(tty3270_driver, index, NULL); |
1763 | else | 1763 | else |
1764 | tty_unregister_device(tty3270_driver, index); | 1764 | tty_unregister_device(tty3270_driver, index); |
1765 | } | 1765 | } |
@@ -1818,7 +1818,7 @@ tty3270_exit(void) | |||
1818 | 1818 | ||
1819 | raw3270_unregister_notifier(tty3270_notifier); | 1819 | raw3270_unregister_notifier(tty3270_notifier); |
1820 | driver = tty3270_driver; | 1820 | driver = tty3270_driver; |
1821 | tty3270_driver = 0; | 1821 | tty3270_driver = NULL; |
1822 | tty_unregister_driver(driver); | 1822 | tty_unregister_driver(driver); |
1823 | tty3270_del_views(); | 1823 | tty3270_del_views(); |
1824 | } | 1824 | } |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index c625b69ebd19..6cb23040954b 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -86,8 +86,8 @@ struct vmlogrdr_priv_t { | |||
86 | */ | 86 | */ |
87 | static int vmlogrdr_open(struct inode *, struct file *); | 87 | static int vmlogrdr_open(struct inode *, struct file *); |
88 | static int vmlogrdr_release(struct inode *, struct file *); | 88 | static int vmlogrdr_release(struct inode *, struct file *); |
89 | static ssize_t vmlogrdr_read (struct file *filp, char *data, size_t count, | 89 | static ssize_t vmlogrdr_read (struct file *filp, char __user *data, |
90 | loff_t * ppos); | 90 | size_t count, loff_t * ppos); |
91 | 91 | ||
92 | static struct file_operations vmlogrdr_fops = { | 92 | static struct file_operations vmlogrdr_fops = { |
93 | .owner = THIS_MODULE, | 93 | .owner = THIS_MODULE, |
@@ -515,7 +515,7 @@ vmlogrdr_receive_data(struct vmlogrdr_priv_t *priv) { | |||
515 | 515 | ||
516 | 516 | ||
517 | static ssize_t | 517 | static ssize_t |
518 | vmlogrdr_read (struct file *filp, char *data, size_t count, loff_t * ppos) | 518 | vmlogrdr_read(struct file *filp, char __user *data, size_t count, loff_t * ppos) |
519 | { | 519 | { |
520 | int rc; | 520 | int rc; |
521 | struct vmlogrdr_priv_t * priv = filp->private_data; | 521 | struct vmlogrdr_priv_t * priv = filp->private_data; |
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index 5acc0ace3d7d..807320a41fa4 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c | |||
@@ -193,7 +193,7 @@ static int vmwdt_ioctl(struct inode *i, struct file *f, | |||
193 | return 0; | 193 | return 0; |
194 | case WDIOC_GETSTATUS: | 194 | case WDIOC_GETSTATUS: |
195 | case WDIOC_GETBOOTSTATUS: | 195 | case WDIOC_GETBOOTSTATUS: |
196 | return put_user(0, (int *)arg); | 196 | return put_user(0, (int __user *)arg); |
197 | case WDIOC_GETTEMP: | 197 | case WDIOC_GETTEMP: |
198 | return -EINVAL; | 198 | return -EINVAL; |
199 | case WDIOC_SETOPTIONS: | 199 | case WDIOC_SETOPTIONS: |