Bluetooth: hci_bcm: Fix -Wunused-const-variable warnings
authorYueHaibing <yuehaibing@huawei.com>
Mon, 12 Aug 2019 06:22:11 +0000 (14:22 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 5 Sep 2019 15:27:21 +0000 (17:27 +0200)
If CONFIG_ACPI is not set, gcc warn this:

drivers/bluetooth/hci_bcm.c:831:39: warning:
 acpi_bcm_int_last_gpios defined but not used [-Wunused-const-variable=]
drivers/bluetooth/hci_bcm.c:838:39: warning:
 acpi_bcm_int_first_gpios defined but not used [-Wunused-const-variable=]

move them to #ifdef CONFIG_ACPI block.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c

index ae2624fce913471bf4c8b4a25f90fcffc0a8b965..4d9de20bab7b1aede13e48bbc44c7c76579738ef 100644 (file)
@@ -824,6 +824,21 @@ unlock:
 }
 #endif
 
+/* Some firmware reports an IRQ which does not work (wrong pin in fw table?) */
+static const struct dmi_system_id bcm_broken_irq_dmi_table[] = {
+       {
+               .ident = "Meegopad T08",
+               .matches = {
+                       DMI_EXACT_MATCH(DMI_BOARD_VENDOR,
+                                       "To be filled by OEM."),
+                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "T3 MRD"),
+                       DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V1.1"),
+               },
+       },
+       { }
+};
+
+#ifdef CONFIG_ACPI
 static const struct acpi_gpio_params first_gpio = { 0, 0, false };
 static const struct acpi_gpio_params second_gpio = { 1, 0, false };
 static const struct acpi_gpio_params third_gpio = { 2, 0, false };
@@ -842,21 +857,6 @@ static const struct acpi_gpio_mapping acpi_bcm_int_first_gpios[] = {
        { },
 };
 
-/* Some firmware reports an IRQ which does not work (wrong pin in fw table?) */
-static const struct dmi_system_id bcm_broken_irq_dmi_table[] = {
-       {
-               .ident = "Meegopad T08",
-               .matches = {
-                       DMI_EXACT_MATCH(DMI_BOARD_VENDOR,
-                                       "To be filled by OEM."),
-                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "T3 MRD"),
-                       DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V1.1"),
-               },
-       },
-       { }
-};
-
-#ifdef CONFIG_ACPI
 static int bcm_resource(struct acpi_resource *ares, void *data)
 {
        struct bcm_device *dev = data;