diff options
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r-- | drivers/s390/cio/css.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 59c4b94cdb4b..f018835afdf4 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -1013,6 +1013,15 @@ static int __init channel_subsystem_init(void) | |||
1013 | } | 1013 | } |
1014 | subsys_initcall(channel_subsystem_init); | 1014 | subsys_initcall(channel_subsystem_init); |
1015 | 1015 | ||
1016 | static int css_settle(struct device_driver *drv, void *unused) | ||
1017 | { | ||
1018 | struct css_driver *cssdrv = to_cssdriver(drv); | ||
1019 | |||
1020 | if (cssdrv->settle) | ||
1021 | cssdrv->settle(); | ||
1022 | return 0; | ||
1023 | } | ||
1024 | |||
1016 | /* | 1025 | /* |
1017 | * Wait for the initialization of devices to finish, to make sure we are | 1026 | * Wait for the initialization of devices to finish, to make sure we are |
1018 | * done with our setup if the search for the root device starts. | 1027 | * done with our setup if the search for the root device starts. |
@@ -1024,12 +1033,8 @@ static int __init channel_subsystem_init_sync(void) | |||
1024 | /* Wait for the evaluation of subchannels to finish. */ | 1033 | /* Wait for the evaluation of subchannels to finish. */ |
1025 | wait_event(css_eval_wq, atomic_read(&css_eval_scheduled) == 0); | 1034 | wait_event(css_eval_wq, atomic_read(&css_eval_scheduled) == 0); |
1026 | 1035 | ||
1027 | /* Wait for the initialization of ccw devices to finish. */ | 1036 | /* Wait for the subchannel type specific initialization to finish */ |
1028 | wait_event(ccw_device_init_wq, | 1037 | return bus_for_each_drv(&css_bus_type, NULL, NULL, css_settle); |
1029 | atomic_read(&ccw_device_init_count) == 0); | ||
1030 | flush_workqueue(ccw_device_work); | ||
1031 | |||
1032 | return 0; | ||
1033 | } | 1038 | } |
1034 | subsys_initcall_sync(channel_subsystem_init_sync); | 1039 | subsys_initcall_sync(channel_subsystem_init_sync); |
1035 | 1040 | ||