aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2009-09-22 16:58:33 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-22 16:58:41 -0400
commit2f17644d1cd0121daa0a997ff4eca5b3b44d1fae (patch)
tree898504831cd8424525304eb9e35851f744a03d24 /drivers/s390/cio/device.c
parent43c1266ce4dc06bfd236cec31e11e9ecd69c0bef (diff)
[S390] cio: merge init calls
Define initialization sequence of css and ccw bus init calls by merging them into a single init call. Also introduce channel_subsystem_init_sync to wait for the initialization of devices to finish. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 6527f3f34493..4093adc12f2c 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -170,8 +170,7 @@ atomic_t ccw_device_init_count;
170 170
171static void recovery_func(unsigned long data); 171static void recovery_func(unsigned long data);
172 172
173static int __init 173int __init io_subchannel_init(void)
174init_ccw_bus_type (void)
175{ 174{
176 int ret; 175 int ret;
177 176
@@ -181,10 +180,10 @@ init_ccw_bus_type (void)
181 180
182 ccw_device_work = create_singlethread_workqueue("cio"); 181 ccw_device_work = create_singlethread_workqueue("cio");
183 if (!ccw_device_work) 182 if (!ccw_device_work)
184 return -ENOMEM; /* FIXME: better errno ? */ 183 return -ENOMEM;
185 slow_path_wq = create_singlethread_workqueue("kslowcrw"); 184 slow_path_wq = create_singlethread_workqueue("kslowcrw");
186 if (!slow_path_wq) { 185 if (!slow_path_wq) {
187 ret = -ENOMEM; /* FIXME: better errno ? */ 186 ret = -ENOMEM;
188 goto out_err; 187 goto out_err;
189 } 188 }
190 if ((ret = bus_register (&ccw_bus_type))) 189 if ((ret = bus_register (&ccw_bus_type)))
@@ -194,9 +193,6 @@ init_ccw_bus_type (void)
194 if (ret) 193 if (ret)
195 goto out_err; 194 goto out_err;
196 195
197 wait_event(ccw_device_init_wq,
198 atomic_read(&ccw_device_init_count) == 0);
199 flush_workqueue(ccw_device_work);
200 return 0; 196 return 0;
201out_err: 197out_err:
202 if (ccw_device_work) 198 if (ccw_device_work)
@@ -206,16 +202,6 @@ out_err:
206 return ret; 202 return ret;
207} 203}
208 204
209static void __exit
210cleanup_ccw_bus_type (void)
211{
212 css_driver_unregister(&io_subchannel_driver);
213 bus_unregister(&ccw_bus_type);
214 destroy_workqueue(ccw_device_work);
215}
216
217subsys_initcall(init_ccw_bus_type);
218module_exit(cleanup_ccw_bus_type);
219 205
220/************************ device handling **************************/ 206/************************ device handling **************************/
221 207