1 /* SPDX-License-Identifier: GPL-2.0-or-later 2 * Copyright (c) 2017 Cyril Hrubis <chrubis@suse.cz> 3 */ 4 5 #ifndef TST_KERNEL_H__ 6 #define TST_KERNEL_H__ 7 8 /* 9 * Returns 32 if we are running on 32bit kernel and 64 if on 64bit kernel. 10 */ 11 int tst_kernel_bits(void); 12 13 /* 14 * Checks if the kernel module is built-in. 15 * 16 * @param driver The name of the driver. 17 * @return Returns 0 if builtin driver 18 * -1 when driver is missing or config file not available. 19 * On Android *always* 0 (always expect the driver is available). 20 */ 21 int tst_check_builtin_driver(const char *driver); 22 23 /* 24 * Checks support for the kernel module (both built-in and loadable). 25 * 26 * @param driver The name of the driver. 27 * @return Returns 0 if the kernel has the driver, 28 * -1 when driver is missing or config file not available. 29 * On Android *always* 0 (always expect the driver is available). 30 */ 31 int tst_check_driver(const char *driver); 32 33 #endif /* TST_KERNEL_H__ */ 34