diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-07-27 12:29:21 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-07-27 12:29:20 +0200 |
commit | 4434a38c37dd30e5cd01456a136367a43d8da2dd (patch) | |
tree | 7597941ae953297e8f8531e995d9b0c2e9a114a3 /drivers/s390/cio/css.c | |
parent | [S390] cio: Make CIO_* macros safe if dbfs are not available. (diff) | |
download | linux-4434a38c37dd30e5cd01456a136367a43d8da2dd.tar.xz linux-4434a38c37dd30e5cd01456a136367a43d8da2dd.zip |
[S390] cio: Reorganize initialization.
- Localize more of the init calls in init_channel_subsystem().
- Print a warning if init_channel_subsystem() failed.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/s390/cio/css.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index ac5ceb933896..1c27a5a06b49 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -377,8 +377,6 @@ static int __init slow_subchannel_init(void) return 0; } -subsys_initcall(slow_subchannel_init); - static void css_slow_path_func(struct work_struct *unused) { struct subchannel_id schid; @@ -641,9 +639,20 @@ init_channel_subsystem (void) { int ret, i; - if (chsc_determine_css_characteristics() == 0) + ret = chsc_determine_css_characteristics(); + if (ret == -ENOMEM) + goto out; /* No need to continue. */ + if (ret == 0) css_characteristics_avail = 1; + ret = chsc_alloc_sei_area(); + if (ret) + goto out; + + ret = slow_subchannel_init(); + if (ret) + goto out; + if ((ret = bus_register(&css_bus_type))) goto out; @@ -709,6 +718,10 @@ out_unregister: out_bus: bus_unregister(&css_bus_type); out: + chsc_free_sei_area(); + kfree(slow_subchannel_set); + printk(KERN_WARNING"cio: failed to initialize css driver (%d)!\n", + ret); return ret; } |