Bluetooth: btusb: avoid unused function warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 18 Sep 2019 19:59:02 +0000 (21:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:44:08 +0000 (16:44 +0100)
commit68c6909eb65bf9fe42a84a775b06f6593512cee9
tree17f70dca33697e49de7cdf49a37b8703ab7852b1
parente57ff9fb690010a96bd88f2def9db1a16e55a38a
Bluetooth: btusb: avoid unused function warning

[ Upstream commit 42d22098127d6384f789107f59caae87d7520fc4 ]

The btusb_rtl_cmd_timeout() function is used inside of an
ifdef, leading to a warning when this part is hidden
from the compiler:

drivers/bluetooth/btusb.c:530:13: error: unused function 'btusb_rtl_cmd_timeout' [-Werror,-Wunused-function]

Use an IS_ENABLED() check instead so the compiler can see
the code and then discard it silently.

Fixes: d7ef0d1e3968 ("Bluetooth: btusb: Use cmd_timeout to reset Realtek device")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btusb.c