diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/tape_char.c | 4 | ||||
-rw-r--r-- | drivers/s390/char/tape_class.c | 5 | ||||
-rw-r--r-- | drivers/s390/char/tape_class.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index b830a8cbef78..ebe84067bae9 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c | |||
@@ -83,9 +83,9 @@ tapechar_setup_device(struct tape_device * device) | |||
83 | void | 83 | void |
84 | tapechar_cleanup_device(struct tape_device *device) | 84 | tapechar_cleanup_device(struct tape_device *device) |
85 | { | 85 | { |
86 | unregister_tape_dev(device->rt); | 86 | unregister_tape_dev(&device->cdev->dev, device->rt); |
87 | device->rt = NULL; | 87 | device->rt = NULL; |
88 | unregister_tape_dev(device->nt); | 88 | unregister_tape_dev(&device->cdev->dev, device->nt); |
89 | device->nt = NULL; | 89 | device->nt = NULL; |
90 | } | 90 | } |
91 | 91 | ||
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index aa7f166f4034..6dfdb7c17981 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
@@ -99,11 +99,10 @@ fail_with_tcd: | |||
99 | } | 99 | } |
100 | EXPORT_SYMBOL(register_tape_dev); | 100 | EXPORT_SYMBOL(register_tape_dev); |
101 | 101 | ||
102 | void unregister_tape_dev(struct tape_class_device *tcd) | 102 | void unregister_tape_dev(struct device *device, struct tape_class_device *tcd) |
103 | { | 103 | { |
104 | if (tcd != NULL && !IS_ERR(tcd)) { | 104 | if (tcd != NULL && !IS_ERR(tcd)) { |
105 | sysfs_remove_link(&tcd->class_device->kobj, | 105 | sysfs_remove_link(&device->kobj, tcd->mode_name); |
106 | tcd->mode_name); | ||
107 | device_destroy(tape_class, tcd->char_device->dev); | 106 | device_destroy(tape_class, tcd->char_device->dev); |
108 | cdev_del(tcd->char_device); | 107 | cdev_del(tcd->char_device); |
109 | kfree(tcd); | 108 | kfree(tcd); |
diff --git a/drivers/s390/char/tape_class.h b/drivers/s390/char/tape_class.h index e2b5ac918acf..707b7f48c232 100644 --- a/drivers/s390/char/tape_class.h +++ b/drivers/s390/char/tape_class.h | |||
@@ -56,6 +56,6 @@ struct tape_class_device *register_tape_dev( | |||
56 | char * device_name, | 56 | char * device_name, |
57 | char * node_name | 57 | char * node_name |
58 | ); | 58 | ); |
59 | void unregister_tape_dev(struct tape_class_device *tcd); | 59 | void unregister_tape_dev(struct device *device, struct tape_class_device *tcd); |
60 | 60 | ||
61 | #endif /* __TAPE_CLASS_H__ */ | 61 | #endif /* __TAPE_CLASS_H__ */ |