diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-12-07 11:52:03 (GMT) |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 11:51:36 (GMT) |
commit | 8fd138c366a8a302d9da8a428c6e927c8bff7d35 (patch) | |
tree | 23b406a120390a6631fab5ca2f35d91395971c3c /drivers/s390/char/tape_char.c | |
parent | 1b52fff059d660d4bf83d97c389dd80f1e6aad9a (diff) | |
download | linux-8fd138c366a8a302d9da8a428c6e927c8bff7d35.tar.xz |
[S390] tape: cleanup reference counting
Rename tape_get_device to tape_find_device and tape_get_device_reference
to tape_get_device. The old names didn't make too much sense.
Follow the get_device()/put_device() semantic and convert tape_put_device
to a void function.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/tape_char.c')
-rw-r--r-- | drivers/s390/char/tape_char.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index b47e20d..d44e698 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c @@ -286,9 +286,9 @@ tapechar_open (struct inode *inode, struct file *filp) lock_kernel(); minor = iminor(filp->f_path.dentry->d_inode); - device = tape_get_device(minor / TAPE_MINORS_PER_DEV); + device = tape_find_device(minor / TAPE_MINORS_PER_DEV); if (IS_ERR(device)) { - DBF_EVENT(3, "TCHAR:open: tape_get_device() failed\n"); + DBF_EVENT(3, "TCHAR:open: tape_find_device() failed\n"); rc = PTR_ERR(device); goto out; } @@ -340,7 +340,8 @@ tapechar_release(struct inode *inode, struct file *filp) device->char_data.idal_buf = NULL; } tape_release(device); - filp->private_data = tape_put_device(device); + filp->private_data = NULL; + tape_put_device(device); return 0; } |