drivers: net: xgene: Make xgene_enet_of_match depend on CONFIG_OF
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 11 Feb 2015 10:25:40 +0000 (11:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Feb 2015 03:39:08 +0000 (19:39 -0800)
If CONFIG_NET_XGENE=y but CONFIG_OF=n:

drivers/net/ethernet/apm/xgene/xgene_enet_main.c:1033: warning: ‘xgene_enet_of_match’ defined but not used

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c

index 44b15373d6b3e628a0198f888c163a5cbc1b9544..4de62b210c85bab8e3d172234f24381da7a66276 100644 (file)
@@ -1030,12 +1030,14 @@ static const struct acpi_device_id xgene_enet_acpi_match[] = {
 MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match);
 #endif
 
+#ifdef CONFIG_OF
 static struct of_device_id xgene_enet_of_match[] = {
        {.compatible = "apm,xgene-enet",},
        {},
 };
 
 MODULE_DEVICE_TABLE(of, xgene_enet_of_match);
+#endif
 
 static struct platform_driver xgene_enet_driver = {
        .driver = {