aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/char/tape_char.c
diff options
context:
space:
mode:
authorMichael Holzheu2008-04-17 07:46:05 +0200
committerHeiko Carstens2008-04-17 07:46:59 +0200
commit92bf435f383a6193d59c687ce87ccca3529c68a1 (patch)
tree90ad17f1017103984c7f1aee20be7637b861e636 /drivers/s390/char/tape_char.c
parent00966c0a5b00bc0afdc0bd0446adec271f8b098b (diff)
[S390] tape: duplicate sysfs filename when setting tape device online
When a tape device is set online, offline and online again, the following error message is printed on the console: "sysfs: duplicate filename 'non-rewinding' can not be created". The reason is that when setting a device online, the tape driver creates a sysfs symlink from the tape device to the tape class device. Unfortunately the symlink is not removed correctly, when the device is set offline. Instead of passing the tape device object to sysfs_remove_link, the class device object is used. This patch fixes this problem and uses the correct tape device object now. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/tape_char.c')
-rw-r--r--drivers/s390/char/tape_char.c4
1 files changed, 2 insertions, 2 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)
void
tapechar_cleanup_device(struct tape_device *device)
{
- unregister_tape_dev(device->rt);
+ unregister_tape_dev(&device->cdev->dev, device->rt);
device->rt = NULL;
- unregister_tape_dev(device->nt);
+ unregister_tape_dev(&device->cdev->dev, device->nt);
device->nt = NULL;
}