]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: smsc911x: skip acpi_device_id table when !CONFIG_ACPI
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Mon, 5 Apr 2021 18:15:48 +0000 (20:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Apr 2021 22:05:02 +0000 (15:05 -0700)
The driver can match via multiple methods.  Its acpi_device_id table is
referenced via ACPI_PTR() so it will be unused for !CONFIG_ACPI builds:

  drivers/net/ethernet/smsc/smsc911x.c:2652:36: warning:
    ‘smsc911x_acpi_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smsc911x.c

index 606c79de93a6814616ca30c7025d59eb4d343b09..556a9790cdcfd8ff0a582e7fc2145f14fd4a344b 100644 (file)
@@ -2649,11 +2649,13 @@ static const struct of_device_id smsc911x_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, smsc911x_dt_ids);
 #endif
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id smsc911x_acpi_match[] = {
        { "ARMH9118", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(acpi, smsc911x_acpi_match);
+#endif
 
 static struct platform_driver smsc911x_driver = {
        .probe = smsc911x_drv_probe,