162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci   BlueZ - Bluetooth protocol stack for Linux
362306a36Sopenharmony_ci   Copyright (C) 2014 Intel Corporation
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci   This program is free software; you can redistribute it and/or modify
662306a36Sopenharmony_ci   it under the terms of the GNU General Public License version 2 as
762306a36Sopenharmony_ci   published by the Free Software Foundation;
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1062306a36Sopenharmony_ci   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1162306a36Sopenharmony_ci   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
1262306a36Sopenharmony_ci   IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
1362306a36Sopenharmony_ci   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
1462306a36Sopenharmony_ci   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1562306a36Sopenharmony_ci   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1662306a36Sopenharmony_ci   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
1962306a36Sopenharmony_ci   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
2062306a36Sopenharmony_ci   SOFTWARE IS DISCLAIMED.
2162306a36Sopenharmony_ci*/
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#if IS_ENABLED(CONFIG_BT_SELFTEST) && IS_MODULE(CONFIG_BT)
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/* When CONFIG_BT_SELFTEST=y and the CONFIG_BT=m, then the self testing
2662306a36Sopenharmony_ci * is run at module loading time.
2762306a36Sopenharmony_ci */
2862306a36Sopenharmony_ciint bt_selftest(void);
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci#else
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci/* When CONFIG_BT_SELFTEST=y and CONFIG_BT=y, then the self testing
3362306a36Sopenharmony_ci * is run via late_initcall() to make sure that subsys_initcall() of
3462306a36Sopenharmony_ci * the Bluetooth subsystem and device_initcall() of the Crypto subsystem
3562306a36Sopenharmony_ci * do not clash.
3662306a36Sopenharmony_ci *
3762306a36Sopenharmony_ci * When CONFIG_BT_SELFTEST=n, then this turns into an empty call that
3862306a36Sopenharmony_ci * has no impact.
3962306a36Sopenharmony_ci */
4062306a36Sopenharmony_cistatic inline int bt_selftest(void)
4162306a36Sopenharmony_ci{
4262306a36Sopenharmony_ci	return 0;
4362306a36Sopenharmony_ci}
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci#endif
46