Frederic Barrat | 5ef3166 | 2018-01-23 12:31:41 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | // Copyright 2017 IBM Corp. |
| 3 | #include <linux/module.h> |
| 4 | #include <linux/pci.h> |
| 5 | #include "ocxl_internal.h" |
| 6 | |
| 7 | static int __init init_ocxl(void) |
| 8 | { |
| 9 | int rc = 0; |
| 10 | |
| 11 | rc = ocxl_file_init(); |
| 12 | if (rc) |
| 13 | return rc; |
| 14 | |
| 15 | rc = pci_register_driver(&ocxl_pci_driver); |
| 16 | if (rc) { |
| 17 | ocxl_file_exit(); |
| 18 | return rc; |
| 19 | } |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | static void exit_ocxl(void) |
| 24 | { |
| 25 | pci_unregister_driver(&ocxl_pci_driver); |
| 26 | ocxl_file_exit(); |
| 27 | } |
| 28 | |
| 29 | module_init(init_ocxl); |
| 30 | module_exit(exit_ocxl); |
| 31 | |
| 32 | MODULE_DESCRIPTION("Open Coherent Accelerator"); |
| 33 | MODULE_LICENSE("GPL"); |