[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>
This commit is contained in:

committed by
Martin Schwidefsky

parent
43c1266ce4
commit
2f17644d1c
@@ -170,8 +170,7 @@ atomic_t ccw_device_init_count;
|
||||
|
||||
static void recovery_func(unsigned long data);
|
||||
|
||||
static int __init
|
||||
init_ccw_bus_type (void)
|
||||
int __init io_subchannel_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -181,10 +180,10 @@ init_ccw_bus_type (void)
|
||||
|
||||
ccw_device_work = create_singlethread_workqueue("cio");
|
||||
if (!ccw_device_work)
|
||||
return -ENOMEM; /* FIXME: better errno ? */
|
||||
return -ENOMEM;
|
||||
slow_path_wq = create_singlethread_workqueue("kslowcrw");
|
||||
if (!slow_path_wq) {
|
||||
ret = -ENOMEM; /* FIXME: better errno ? */
|
||||
ret = -ENOMEM;
|
||||
goto out_err;
|
||||
}
|
||||
if ((ret = bus_register (&ccw_bus_type)))
|
||||
@@ -194,9 +193,6 @@ init_ccw_bus_type (void)
|
||||
if (ret)
|
||||
goto out_err;
|
||||
|
||||
wait_event(ccw_device_init_wq,
|
||||
atomic_read(&ccw_device_init_count) == 0);
|
||||
flush_workqueue(ccw_device_work);
|
||||
return 0;
|
||||
out_err:
|
||||
if (ccw_device_work)
|
||||
@@ -206,16 +202,6 @@ out_err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit
|
||||
cleanup_ccw_bus_type (void)
|
||||
{
|
||||
css_driver_unregister(&io_subchannel_driver);
|
||||
bus_unregister(&ccw_bus_type);
|
||||
destroy_workqueue(ccw_device_work);
|
||||
}
|
||||
|
||||
subsys_initcall(init_ccw_bus_type);
|
||||
module_exit(cleanup_ccw_bus_type);
|
||||
|
||||
/************************ device handling **************************/
|
||||
|
||||
|
Reference in New Issue
Block a user