nfc: st-nci: mark ACPI and OF device ID tables as maybe unused
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Fri, 28 May 2021 12:41:58 +0000 (08:41 -0400)
committerJakub Kicinski <kuba@kernel.org>
Fri, 28 May 2021 22:05:56 +0000 (15:05 -0700)
The driver can match either via OF or ACPI ID tables.  If one
configuration is disabled, the table will be unused:

    drivers/nfc/st-nci/spi.c:296:34: warning:
        ‘of_st_nci_spi_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210528124200.79655-10-krzysztof.kozlowski@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/nfc/st-nci/i2c.c
drivers/nfc/st-nci/spi.c

index 55d600c..663d1cc 100644 (file)
@@ -274,14 +274,14 @@ static const struct i2c_device_id st_nci_i2c_id_table[] = {
 };
 MODULE_DEVICE_TABLE(i2c, st_nci_i2c_id_table);
 
-static const struct acpi_device_id st_nci_i2c_acpi_match[] = {
+static const struct acpi_device_id st_nci_i2c_acpi_match[] __maybe_unused = {
        {"SMO2101"},
        {"SMO2102"},
        {}
 };
 MODULE_DEVICE_TABLE(acpi, st_nci_i2c_acpi_match);
 
-static const struct of_device_id of_st_nci_i2c_match[] = {
+static const struct of_device_id of_st_nci_i2c_match[] __maybe_unused = {
        { .compatible = "st,st21nfcb-i2c", },
        { .compatible = "st,st21nfcb_i2c", },
        { .compatible = "st,st21nfcc-i2c", },
index 09df6ea..5f1a217 100644 (file)
@@ -287,13 +287,13 @@ static struct spi_device_id st_nci_spi_id_table[] = {
 };
 MODULE_DEVICE_TABLE(spi, st_nci_spi_id_table);
 
-static const struct acpi_device_id st_nci_spi_acpi_match[] = {
+static const struct acpi_device_id st_nci_spi_acpi_match[] __maybe_unused = {
        {"SMO2101", 0},
        {}
 };
 MODULE_DEVICE_TABLE(acpi, st_nci_spi_acpi_match);
 
-static const struct of_device_id of_st_nci_spi_match[] = {
+static const struct of_device_id of_st_nci_spi_match[] __maybe_unused = {
        { .compatible = "st,st21nfcb-spi", },
        {}
 };