aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/tape_char.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-12-07 06:52:03 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:36 -0500
commit8fd138c366a8a302d9da8a428c6e927c8bff7d35 (patch)
tree23b406a120390a6631fab5ca2f35d91395971c3c /drivers/s390/char/tape_char.c
parent1b52fff059d660d4bf83d97c389dd80f1e6aad9a (diff)
[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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c
index b47e20d3d1da..d44e6981eeac 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)
286 286
287 lock_kernel(); 287 lock_kernel();
288 minor = iminor(filp->f_path.dentry->d_inode); 288 minor = iminor(filp->f_path.dentry->d_inode);
289 device = tape_get_device(minor / TAPE_MINORS_PER_DEV); 289 device = tape_find_device(minor / TAPE_MINORS_PER_DEV);
290 if (IS_ERR(device)) { 290 if (IS_ERR(device)) {
291 DBF_EVENT(3, "TCHAR:open: tape_get_device() failed\n"); 291 DBF_EVENT(3, "TCHAR:open: tape_find_device() failed\n");
292 rc = PTR_ERR(device); 292 rc = PTR_ERR(device);
293 goto out; 293 goto out;
294 } 294 }
@@ -340,7 +340,8 @@ tapechar_release(struct inode *inode, struct file *filp)
340 device->char_data.idal_buf = NULL; 340 device->char_data.idal_buf = NULL;
341 } 341 }
342 tape_release(device); 342 tape_release(device);
343 filp->private_data = tape_put_device(device); 343 filp->private_data = NULL;
344 tape_put_device(device);
344 345
345 return 0; 346 return 0;
346} 347}