diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2011-01-25 14:22:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-26 01:41:55 -0500 |
commit | 682a1694115ec1c8fcd794c35b80354166978207 (patch) | |
tree | bbab321c613d5a7bc6f0ead061361ae87e177ae5 /drivers/net/smc91x.c | |
parent | b86fb2cfe82fc4a555f0841f5f8ca4db303ed092 (diff) |
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.c | 13 |
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[] = | |||
81 | #include <linux/ethtool.h> | 81 | #include <linux/ethtool.h> |
82 | #include <linux/mii.h> | 82 | #include <linux/mii.h> |
83 | #include <linux/workqueue.h> | 83 | #include <linux/workqueue.h> |
84 | #include <linux/of.h> | ||
84 | 85 | ||
85 | #include <linux/netdevice.h> | 86 | #include <linux/netdevice.h> |
86 | #include <linux/etherdevice.h> | 87 | #include <linux/etherdevice.h> |
@@ -2394,6 +2395,15 @@ static int smc_drv_resume(struct device *dev) | |||
2394 | return 0; | 2395 | return 0; |
2395 | } | 2396 | } |
2396 | 2397 | ||
2398 | #ifdef CONFIG_OF | ||
2399 | static const struct of_device_id smc91x_match[] = { | ||
2400 | { .compatible = "smsc,lan91c94", }, | ||
2401 | { .compatible = "smsc,lan91c111", }, | ||
2402 | {}, | ||
2403 | } | ||
2404 | MODULE_DEVICE_TABLE(of, smc91x_match); | ||
2405 | #endif | ||
2406 | |||
2397 | static struct dev_pm_ops smc_drv_pm_ops = { | 2407 | static struct dev_pm_ops smc_drv_pm_ops = { |
2398 | .suspend = smc_drv_suspend, | 2408 | .suspend = smc_drv_suspend, |
2399 | .resume = smc_drv_resume, | 2409 | .resume = smc_drv_resume, |
@@ -2406,6 +2416,9 @@ static struct platform_driver smc_driver = { | |||
2406 | .name = CARDNAME, | 2416 | .name = CARDNAME, |
2407 | .owner = THIS_MODULE, | 2417 | .owner = THIS_MODULE, |
2408 | .pm = &smc_drv_pm_ops, | 2418 | .pm = &smc_drv_pm_ops, |
2419 | #ifdef CONFIG_OF | ||
2420 | .of_match_table = smc91x_match, | ||
2421 | #endif | ||
2409 | }, | 2422 | }, |
2410 | }; | 2423 | }; |
2411 | 2424 | ||