Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array

When USB support is disabled, the array is not referenced anywhere,
causing a warning:

drivers/bluetooth/btmtk.c:35:3: error: 'btmtk_mt6639_devs' defined but not used [-Werror=unused-const-variable=]
35 | } btmtk_mt6639_devs[] = {
| ^~~~~~~~~~~~~~~~~

Move it into the #ifdef block.

Fixes: 28b7c5a6db74 ("Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Arnd Bergmann and committed by
Luiz Augusto von Dentz
81f971c6 751b06a2

+16 -16
+16 -16
drivers/bluetooth/btmtk.c
··· 25 25 /* It is for mt79xx iso data transmission setting */ 26 26 #define MTK_ISO_THRESHOLD 264 27 27 28 - /* Known MT6639 (MT7927) Bluetooth USB devices. 29 - * Used to scope the zero-CHIPID workaround to real MT6639 hardware, 30 - * since some boards return 0x0000 from the MMIO chip ID register. 31 - */ 32 - static const struct { 33 - u16 vendor; 34 - u16 product; 35 - } btmtk_mt6639_devs[] = { 36 - { 0x0489, 0xe13a }, /* ASUS ROG Crosshair X870E Hero */ 37 - { 0x0489, 0xe0fa }, /* Lenovo Legion Pro 7 16ARX9 */ 38 - { 0x0489, 0xe10f }, /* Gigabyte Z790 AORUS MASTER X */ 39 - { 0x0489, 0xe110 }, /* MSI X870E Ace Max */ 40 - { 0x0489, 0xe116 }, /* TP-Link Archer TBE550E */ 41 - { 0x13d3, 0x3588 }, /* ASUS ROG STRIX X870E-E */ 42 - }; 43 - 44 28 struct btmtk_patch_header { 45 29 u8 datetime[16]; 46 30 u8 platform[4]; ··· 467 483 EXPORT_SYMBOL_GPL(btmtk_process_coredump); 468 484 469 485 #if IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK) 486 + /* Known MT6639 (MT7927) Bluetooth USB devices. 487 + * Used to scope the zero-CHIPID workaround to real MT6639 hardware, 488 + * since some boards return 0x0000 from the MMIO chip ID register. 489 + */ 490 + static const struct { 491 + u16 vendor; 492 + u16 product; 493 + } btmtk_mt6639_devs[] = { 494 + { 0x0489, 0xe13a }, /* ASUS ROG Crosshair X870E Hero */ 495 + { 0x0489, 0xe0fa }, /* Lenovo Legion Pro 7 16ARX9 */ 496 + { 0x0489, 0xe10f }, /* Gigabyte Z790 AORUS MASTER X */ 497 + { 0x0489, 0xe110 }, /* MSI X870E Ace Max */ 498 + { 0x0489, 0xe116 }, /* TP-Link Archer TBE550E */ 499 + { 0x13d3, 0x3588 }, /* ASUS ROG STRIX X870E-E */ 500 + }; 501 + 470 502 static void btmtk_usb_wmt_recv(struct urb *urb) 471 503 { 472 504 struct hci_dev *hdev = urb->context;