18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci   BlueZ - Bluetooth protocol stack for Linux
38c2ecf20Sopenharmony_ci   Copyright (C) 2014 Intel Corporation
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci   This program is free software; you can redistribute it and/or modify
68c2ecf20Sopenharmony_ci   it under the terms of the GNU General Public License version 2 as
78c2ecf20Sopenharmony_ci   published by the Free Software Foundation;
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
108c2ecf20Sopenharmony_ci   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118c2ecf20Sopenharmony_ci   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
128c2ecf20Sopenharmony_ci   IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
138c2ecf20Sopenharmony_ci   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
148c2ecf20Sopenharmony_ci   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
158c2ecf20Sopenharmony_ci   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
168c2ecf20Sopenharmony_ci   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
198c2ecf20Sopenharmony_ci   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
208c2ecf20Sopenharmony_ci   SOFTWARE IS DISCLAIMED.
218c2ecf20Sopenharmony_ci*/
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#if IS_ENABLED(CONFIG_BT_SELFTEST) && IS_MODULE(CONFIG_BT)
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci/* When CONFIG_BT_SELFTEST=y and the CONFIG_BT=m, then the self testing
268c2ecf20Sopenharmony_ci * is run at module loading time.
278c2ecf20Sopenharmony_ci */
288c2ecf20Sopenharmony_ciint bt_selftest(void);
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#else
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci/* When CONFIG_BT_SELFTEST=y and CONFIG_BT=y, then the self testing
338c2ecf20Sopenharmony_ci * is run via late_initcall() to make sure that subsys_initcall() of
348c2ecf20Sopenharmony_ci * the Bluetooth subsystem and device_initcall() of the Crypto subsystem
358c2ecf20Sopenharmony_ci * do not clash.
368c2ecf20Sopenharmony_ci *
378c2ecf20Sopenharmony_ci * When CONFIG_BT_SELFTEST=n, then this turns into an empty call that
388c2ecf20Sopenharmony_ci * has no impact.
398c2ecf20Sopenharmony_ci */
408c2ecf20Sopenharmony_cistatic inline int bt_selftest(void)
418c2ecf20Sopenharmony_ci{
428c2ecf20Sopenharmony_ci	return 0;
438c2ecf20Sopenharmony_ci}
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#endif
46