summaryrefslogtreecommitdiff
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2011-01-25 22:22:05 +0300
committerDavid S. Miller <davem@davemloft.net>2011-01-26 09:41:55 +0300
commit682a1694115ec1c8fcd794c35b80354166978207 (patch)
treebbab321c613d5a7bc6f0ead061361ae87e177ae5 /drivers/net/smc91x.c
parentb86fb2cfe82fc4a555f0841f5f8ca4db303ed092 (diff)
downloadlinux-682a1694115ec1c8fcd794c35b80354166978207.tar.xz
smc91x: add devicetree support
Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 726df611ee17..43654a3bb0ec 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -81,6 +81,7 @@ static const char version[] =
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/workqueue.h>
+#include <linux/of.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
@@ -2394,6 +2395,15 @@ static int smc_drv_resume(struct device *dev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id smc91x_match[] = {
+ { .compatible = "smsc,lan91c94", },
+ { .compatible = "smsc,lan91c111", },
+ {},
+}
+MODULE_DEVICE_TABLE(of, smc91x_match);
+#endif
+
static struct dev_pm_ops smc_drv_pm_ops = {
.suspend = smc_drv_suspend,
.resume = smc_drv_resume,
@@ -2406,6 +2416,9 @@ static struct platform_driver smc_driver = {
.name = CARDNAME,
.owner = THIS_MODULE,
.pm = &smc_drv_pm_ops,
+#ifdef CONFIG_OF
+ .of_match_table = smc91x_match,
+#endif
},
};