aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/viotape.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/viotape.c')
-rw-r--r--drivers/char/viotape.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index aea3cbf5219d..4764b4f9555d 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -237,7 +237,7 @@ static dma_addr_t viotape_unitinfo_token;
237 237
238static struct mtget viomtget[VIOTAPE_MAX_TAPE]; 238static struct mtget viomtget[VIOTAPE_MAX_TAPE];
239 239
240static struct class_simple *tape_class; 240static struct class *tape_class;
241 241
242static struct device *tape_device[VIOTAPE_MAX_TAPE]; 242static struct device *tape_device[VIOTAPE_MAX_TAPE];
243 243
@@ -956,9 +956,9 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
956 state[i].cur_part = 0; 956 state[i].cur_part = 0;
957 for (j = 0; j < MAX_PARTITIONS; ++j) 957 for (j = 0; j < MAX_PARTITIONS; ++j)
958 state[i].part_stat_rwi[j] = VIOT_IDLE; 958 state[i].part_stat_rwi[j] = VIOT_IDLE;
959 class_simple_device_add(tape_class, MKDEV(VIOTAPE_MAJOR, i), NULL, 959 class_device_create(tape_class, MKDEV(VIOTAPE_MAJOR, i), NULL,
960 "iseries!vt%d", i); 960 "iseries!vt%d", i);
961 class_simple_device_add(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80), 961 class_device_create(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80),
962 NULL, "iseries!nvt%d", i); 962 NULL, "iseries!nvt%d", i);
963 devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, 963 devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR,
964 "iseries/vt%d", i); 964 "iseries/vt%d", i);
@@ -980,8 +980,8 @@ static int viotape_remove(struct vio_dev *vdev)
980 devfs_remove("iseries/nvt%d", i); 980 devfs_remove("iseries/nvt%d", i);
981 devfs_remove("iseries/vt%d", i); 981 devfs_remove("iseries/vt%d", i);
982 devfs_unregister_tape(state[i].dev_handle); 982 devfs_unregister_tape(state[i].dev_handle);
983 class_simple_device_remove(MKDEV(VIOTAPE_MAJOR, i | 0x80)); 983 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80));
984 class_simple_device_remove(MKDEV(VIOTAPE_MAJOR, i)); 984 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i));
985 return 0; 985 return 0;
986} 986}
987 987
@@ -1045,7 +1045,7 @@ int __init viotap_init(void)
1045 goto clear_handler; 1045 goto clear_handler;
1046 } 1046 }
1047 1047
1048 tape_class = class_simple_create(THIS_MODULE, "tape"); 1048 tape_class = class_create(THIS_MODULE, "tape");
1049 if (IS_ERR(tape_class)) { 1049 if (IS_ERR(tape_class)) {
1050 printk(VIOTAPE_KERN_WARN "Unable to allocat class\n"); 1050 printk(VIOTAPE_KERN_WARN "Unable to allocat class\n");
1051 ret = PTR_ERR(tape_class); 1051 ret = PTR_ERR(tape_class);
@@ -1070,7 +1070,7 @@ int __init viotap_init(void)
1070 return 0; 1070 return 0;
1071 1071
1072unreg_class: 1072unreg_class:
1073 class_simple_destroy(tape_class); 1073 class_destroy(tape_class);
1074unreg_chrdev: 1074unreg_chrdev:
1075 unregister_chrdev(VIOTAPE_MAJOR, "viotape"); 1075 unregister_chrdev(VIOTAPE_MAJOR, "viotape");
1076clear_handler: 1076clear_handler:
@@ -1110,7 +1110,7 @@ static void __exit viotap_exit(void)
1110 1110
1111 remove_proc_entry("iSeries/viotape", NULL); 1111 remove_proc_entry("iSeries/viotape", NULL);
1112 vio_unregister_driver(&viotape_driver); 1112 vio_unregister_driver(&viotape_driver);
1113 class_simple_destroy(tape_class); 1113 class_destroy(tape_class);
1114 ret = unregister_chrdev(VIOTAPE_MAJOR, "viotape"); 1114 ret = unregister_chrdev(VIOTAPE_MAJOR, "viotape");
1115 if (ret < 0) 1115 if (ret < 0)
1116 printk(VIOTAPE_KERN_WARN "Error unregistering device: %d\n", 1116 printk(VIOTAPE_KERN_WARN "Error unregistering device: %d\n",