diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2008-12-19 16:56:55 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 18:24:36 +0100 |
commit | b228af0269eaf1af22dbae12a0860f8dbfd63662 (patch) | |
tree | b8605995801a890d9c213e0ef1c3de63a4b4c312 /drivers/s390/scsi/zfcp_cfdc.c | |
parent | [SCSI] zfcp: Simplify SBAL allocation to fix sparse warnings (diff) | |
download | linux-b228af0269eaf1af22dbae12a0860f8dbfd63662.tar.xz linux-b228af0269eaf1af22dbae12a0860f8dbfd63662.zip |
[SCSI] zfcp: Remove adapter list
After the latest changes, the list of FCP devices is only used to
lookup the adapter for requests from the actcli tool. Change this to
use the lookup function in the cio layer. Now we can remove the
adapter list and have one place less to use the global config_lock.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Acked-by: Felix Beck <felix@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_cfdc.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_cfdc.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c index f1a7518e67ed..10cbfd172a28 100644 --- a/drivers/s390/scsi/zfcp_cfdc.c +++ b/drivers/s390/scsi/zfcp_cfdc.c @@ -85,20 +85,9 @@ static int zfcp_cfdc_copy_to_user(void __user *user_buffer, static struct zfcp_adapter *zfcp_cfdc_get_adapter(u32 devno) { - struct zfcp_adapter *adapter = NULL, *cur_adapter; - struct ccw_dev_id dev_id; - - read_lock_irq(&zfcp_data.config_lock); - list_for_each_entry(cur_adapter, &zfcp_data.adapter_list_head, list) { - ccw_device_get_id(cur_adapter->ccw_device, &dev_id); - if (dev_id.devno == devno) { - adapter = cur_adapter; - zfcp_adapter_get(adapter); - break; - } - } - read_unlock_irq(&zfcp_data.config_lock); - return adapter; + char busid[9]; + snprintf(busid, sizeof(busid), "0.0.%04x", devno); + return zfcp_get_adapter_by_busid(busid); } static int zfcp_cfdc_set_fsf(struct zfcp_fsf_cfdc *fsf_cfdc, int command) |