diff options
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, | |||
85 | 85 | ||
86 | static struct zfcp_adapter *zfcp_cfdc_get_adapter(u32 devno) | 86 | static struct zfcp_adapter *zfcp_cfdc_get_adapter(u32 devno) |
87 | { | 87 | { |
88 | struct zfcp_adapter *adapter = NULL, *cur_adapter; | 88 | char busid[9]; |
89 | struct ccw_dev_id dev_id; | 89 | snprintf(busid, sizeof(busid), "0.0.%04x", devno); |
90 | 90 | return zfcp_get_adapter_by_busid(busid); | |
91 | read_lock_irq(&zfcp_data.config_lock); | ||
92 | list_for_each_entry(cur_adapter, &zfcp_data.adapter_list_head, list) { | ||
93 | ccw_device_get_id(cur_adapter->ccw_device, &dev_id); | ||
94 | if (dev_id.devno == devno) { | ||
95 | adapter = cur_adapter; | ||
96 | zfcp_adapter_get(adapter); | ||
97 | break; | ||
98 | } | ||
99 | } | ||
100 | read_unlock_irq(&zfcp_data.config_lock); | ||
101 | return adapter; | ||
102 | } | 91 | } |
103 | 92 | ||
104 | static int zfcp_cfdc_set_fsf(struct zfcp_fsf_cfdc *fsf_cfdc, int command) | 93 | static int zfcp_cfdc_set_fsf(struct zfcp_fsf_cfdc *fsf_cfdc, int command) |