1 /* 2 * hdf_driver_module.h 3 * 4 * osal driver 5 * 6 * Copyright (c) 2022 Huawei Device Co., Ltd. 7 * 8 * This software is licensed under the terms of the GNU General Public 9 * License version 2, as published by the Free Software Foundation, and 10 * may be copied, distributed, and modified under those terms. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 */ 18 19 #ifndef HDF_DRIVER_MODULE_H 20 #define HDF_DRIVER_MODULE_H 21 22 #include <linux/kernel.h> 23 #include <linux/module.h> 24 25 #include "hdf_driver.h" 26 27 #define HDF_DRIVER_MODULE(module) \ 28 static int __init hdf_driver_init(void) \ 29 { \ 30 HDF_LOGI("hdf driver " #module " register"); \ 31 return HdfRegisterDriverEntry(&module); \ 32 } \ 33 static void __exit hdf_driver_exit(void) \ 34 { \ 35 HDF_LOGI("hdf driver " #module " unregister"); \ 36 HdfUnregisterDriverEntry(&module); \ 37 } \ 38 module_init(hdf_driver_init); \ 39 module_exit(hdf_driver_exit); 40 41 #endif // HDF_DRIVER_MODULE_H