aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_cfdc.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2009-11-24 10:53:59 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:02:02 -0500
commitf3450c7b917201bb49d67032e9f60d5125675d6a (patch)
tree404b1c23490b0a5ba3d6cbbb14e64381a12a108a /drivers/s390/scsi/zfcp_cfdc.c
parentecf0c7721b104c0ce9c8ca534c911f6310cf92a8 (diff)
[SCSI] zfcp: Replace local reference counting with common kref
Replace the local reference counting by already available mechanisms offered by kref. Where possible existing device structures were used, including the same functionality. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_cfdc.c')
-rw-r--r--drivers/s390/scsi/zfcp_cfdc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c
index ef681dfed0c..856f82dbcb1 100644
--- a/drivers/s390/scsi/zfcp_cfdc.c
+++ b/drivers/s390/scsi/zfcp_cfdc.c
@@ -98,7 +98,7 @@ static struct zfcp_adapter *zfcp_cfdc_get_adapter(u32 devno)
98 if (!adapter) 98 if (!adapter)
99 goto out_put; 99 goto out_put;
100 100
101 zfcp_adapter_get(adapter); 101 kref_get(&adapter->ref);
102out_put: 102out_put:
103 put_device(&ccwdev->dev); 103 put_device(&ccwdev->dev);
104out: 104out:
@@ -212,7 +212,6 @@ static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command,
212 retval = -ENXIO; 212 retval = -ENXIO;
213 goto free_buffer; 213 goto free_buffer;
214 } 214 }
215 zfcp_adapter_get(adapter);
216 215
217 retval = zfcp_cfdc_sg_setup(data->command, fsf_cfdc->sg, 216 retval = zfcp_cfdc_sg_setup(data->command, fsf_cfdc->sg,
218 data_user->control_file); 217 data_user->control_file);
@@ -245,7 +244,7 @@ static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command,
245 free_sg: 244 free_sg:
246 zfcp_sg_free_table(fsf_cfdc->sg, ZFCP_CFDC_PAGES); 245 zfcp_sg_free_table(fsf_cfdc->sg, ZFCP_CFDC_PAGES);
247 adapter_put: 246 adapter_put:
248 zfcp_adapter_put(adapter); 247 kref_put(&adapter->ref, zfcp_adapter_release);
249 free_buffer: 248 free_buffer:
250 kfree(data); 249 kfree(data);
251 no_mem_sense: 250 no_mem_sense: