]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
net: smc91x: add ACPI probing support.
authorGraeme Gregory <graeme.gregory@linaro.org>
Wed, 24 Jul 2013 10:29:48 +0000 (11:29 +0100)
committerJulien Grall <julien.grall@citrix.com>
Mon, 28 Sep 2015 11:05:18 +0000 (12:05 +0100)
Add device ID LINA0003 for this device and add the match table.

As its a platform device it needs no other code and will be probed in by
acpi_platform once device ID is added.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
drivers/net/ethernet/smsc/smc91x.c

index 630f0b7800e47e085c5ffb2db6ac23efef9ad08c..10fcc67d549fc40c0749faa64a2e685995f6c20b 100644 (file)
@@ -65,6 +65,7 @@ static const char version[] =
 #endif
 
 
+#include <linux/acpi.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -82,7 +83,6 @@ static const char version[] =
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
-
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
@@ -2463,6 +2463,14 @@ static struct dev_pm_ops smc_drv_pm_ops = {
        .resume         = smc_drv_resume,
 };
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id smc91x_acpi_match[] = {
+       { "LNRO0003", },
+       { }
+};
+MODULE_DEVICE_TABLE(acpi, smc91x_acpi_match);
+#endif
+
 static struct platform_driver smc_driver = {
        .probe          = smc_drv_probe,
        .remove         = smc_drv_remove,
@@ -2470,6 +2478,7 @@ static struct platform_driver smc_driver = {
                .name   = CARDNAME,
                .pm     = &smc_drv_pm_ops,
                .of_match_table = of_match_ptr(smc91x_match),
+               .acpi_match_table = ACPI_PTR(smc91x_acpi_match),
        },
 };