diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-09-24 04:23:22 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-10-02 10:49:47 -0400 |
commit | c5afd81e5d7ebacc9dd23954e169ac79a34fe399 (patch) | |
tree | 91de28df6297b9823d6eb10533b7728a4b48e6ba /drivers/s390/scsi/zfcp_ccw.c | |
parent | b1a58985853574346f1518531bdd82069501b317 (diff) |
[SCSI] zfcp: Fix initial device and cfdc for delayed adapter allocation
With the change for delaying the allocation of zfcp_adapter, the
initial device parameter function has to first call
ccw_device_set_online which allocates the zfcp_adapter structure.
Change this and adapt the cfdc part accordingly.
Reviewed-by: Felix Beck <felix.beck@de.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_ccw.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 0c90f8e71605..ef5282dcdbb4 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -259,7 +259,7 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev) | |||
259 | mutex_unlock(&zfcp_data.config_mutex); | 259 | mutex_unlock(&zfcp_data.config_mutex); |
260 | } | 260 | } |
261 | 261 | ||
262 | static struct ccw_driver zfcp_ccw_driver = { | 262 | struct ccw_driver zfcp_ccw_driver = { |
263 | .owner = THIS_MODULE, | 263 | .owner = THIS_MODULE, |
264 | .name = "zfcp", | 264 | .name = "zfcp", |
265 | .ids = zfcp_ccw_device_id, | 265 | .ids = zfcp_ccw_device_id, |
@@ -284,20 +284,3 @@ int __init zfcp_ccw_register(void) | |||
284 | { | 284 | { |
285 | return ccw_driver_register(&zfcp_ccw_driver); | 285 | return ccw_driver_register(&zfcp_ccw_driver); |
286 | } | 286 | } |
287 | |||
288 | /** | ||
289 | * zfcp_get_adapter_by_busid - find zfcp_adapter struct | ||
290 | * @busid: bus id string of zfcp adapter to find | ||
291 | */ | ||
292 | struct zfcp_adapter *zfcp_get_adapter_by_busid(char *busid) | ||
293 | { | ||
294 | struct ccw_device *ccw_device; | ||
295 | struct zfcp_adapter *adapter = NULL; | ||
296 | |||
297 | ccw_device = get_ccwdev_by_busid(&zfcp_ccw_driver, busid); | ||
298 | if (ccw_device) { | ||
299 | adapter = dev_get_drvdata(&ccw_device->dev); | ||
300 | put_device(&ccw_device->dev); | ||
301 | } | ||
302 | return adapter; | ||
303 | } | ||