static int __init chp_init(void) { struct chp_id chpid; int ret; ret = crw_register_handler(CRW_RSC_CPATH, chp_process_crw); if (ret) return ret; chp_wq = create_singlethread_workqueue("cio_chp"); if (!chp_wq) { crw_unregister_handler(CRW_RSC_CPATH); return -ENOMEM; } INIT_WORK(&cfg_work, cfg_func); init_waitqueue_head(&cfg_wait_queue); if (info_update()) return 0; /* Register available channel-paths. */ chp_id_for_each(&chpid) { if (chp_info_get_status(chpid) != CHP_STATUS_NOT_RECOGNIZED) chp_new(chpid); } return 0; }
void __init chsc_init_cleanup(void) { crw_unregister_handler(CRW_RSC_CSS); free_page((unsigned long)chsc_page); free_page((unsigned long)sei_page); }