pci.c (9f2482b91bcd02ac2999cf04b3fb1b89e1c4d559) | pci.c (576d55d625664a20ee4bae6500952febfb2d7b10) |
---|---|
1/* 2 * NVM Express device driver 3 * Copyright (c) 2011-2014, Intel Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms and conditions of the GNU General Public License, 7 * version 2, as published by the Free Software Foundation. 8 * --- 2216 unchanged lines hidden (view full) --- 2225 int result; 2226 2227 init_waitqueue_head(&nvme_kthread_wait); 2228 2229 nvme_workq = alloc_workqueue("nvme", WQ_UNBOUND | WQ_MEM_RECLAIM, 0); 2230 if (!nvme_workq) 2231 return -ENOMEM; 2232 | 1/* 2 * NVM Express device driver 3 * Copyright (c) 2011-2014, Intel Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms and conditions of the GNU General Public License, 7 * version 2, as published by the Free Software Foundation. 8 * --- 2216 unchanged lines hidden (view full) --- 2225 int result; 2226 2227 init_waitqueue_head(&nvme_kthread_wait); 2228 2229 nvme_workq = alloc_workqueue("nvme", WQ_UNBOUND | WQ_MEM_RECLAIM, 0); 2230 if (!nvme_workq) 2231 return -ENOMEM; 2232 |
2233 result = nvme_core_init(); 2234 if (result < 0) 2235 goto kill_workq; 2236 | |
2237 result = pci_register_driver(&nvme_driver); 2238 if (result) | 2233 result = pci_register_driver(&nvme_driver); 2234 if (result) |
2239 goto core_exit; 2240 return 0; 2241 2242 core_exit: 2243 nvme_core_exit(); 2244 kill_workq: 2245 destroy_workqueue(nvme_workq); | 2235 destroy_workqueue(nvme_workq); |
2246 return result; 2247} 2248 2249static void __exit nvme_exit(void) 2250{ 2251 pci_unregister_driver(&nvme_driver); | 2236 return result; 2237} 2238 2239static void __exit nvme_exit(void) 2240{ 2241 pci_unregister_driver(&nvme_driver); |
2252 nvme_core_exit(); | |
2253 destroy_workqueue(nvme_workq); 2254 BUG_ON(nvme_thread && !IS_ERR(nvme_thread)); 2255 _nvme_check_size(); 2256} 2257 2258MODULE_AUTHOR("Matthew Wilcox <willy@linux.intel.com>"); 2259MODULE_LICENSE("GPL"); 2260MODULE_VERSION("1.0"); 2261module_init(nvme_init); 2262module_exit(nvme_exit); | 2242 destroy_workqueue(nvme_workq); 2243 BUG_ON(nvme_thread && !IS_ERR(nvme_thread)); 2244 _nvme_check_size(); 2245} 2246 2247MODULE_AUTHOR("Matthew Wilcox <willy@linux.intel.com>"); 2248MODULE_LICENSE("GPL"); 2249MODULE_VERSION("1.0"); 2250module_init(nvme_init); 2251module_exit(nvme_exit); |