diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-12-07 06:52:03 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 06:51:36 -0500 |
commit | 8fd138c366a8a302d9da8a428c6e927c8bff7d35 (patch) | |
tree | 23b406a120390a6631fab5ca2f35d91395971c3c /drivers/s390/char/tape_34xx.c | |
parent | 1b52fff059d660d4bf83d97c389dd80f1e6aad9a (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_34xx.c')
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 2fe45ff77b75..3657fe103c27 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -113,16 +113,16 @@ tape_34xx_work_handler(struct work_struct *work) | |||
113 | { | 113 | { |
114 | struct tape_34xx_work *p = | 114 | struct tape_34xx_work *p = |
115 | container_of(work, struct tape_34xx_work, work); | 115 | container_of(work, struct tape_34xx_work, work); |
116 | struct tape_device *device = p->device; | ||
116 | 117 | ||
117 | switch(p->op) { | 118 | switch(p->op) { |
118 | case TO_MSEN: | 119 | case TO_MSEN: |
119 | tape_34xx_medium_sense(p->device); | 120 | tape_34xx_medium_sense(device); |
120 | break; | 121 | break; |
121 | default: | 122 | default: |
122 | DBF_EVENT(3, "T34XX: internal error: unknown work\n"); | 123 | DBF_EVENT(3, "T34XX: internal error: unknown work\n"); |
123 | } | 124 | } |
124 | 125 | tape_put_device(device); | |
125 | p->device = tape_put_device(p->device); | ||
126 | kfree(p); | 126 | kfree(p); |
127 | } | 127 | } |
128 | 128 | ||
@@ -136,7 +136,7 @@ tape_34xx_schedule_work(struct tape_device *device, enum tape_op op) | |||
136 | 136 | ||
137 | INIT_WORK(&p->work, tape_34xx_work_handler); | 137 | INIT_WORK(&p->work, tape_34xx_work_handler); |
138 | 138 | ||
139 | p->device = tape_get_device_reference(device); | 139 | p->device = tape_get_device(device); |
140 | p->op = op; | 140 | p->op = op; |
141 | 141 | ||
142 | schedule_work(&p->work); | 142 | schedule_work(&p->work); |