提交 682a1694 编写于 作者: T Thomas Chou 提交者: David S. Miller

smc91x: add devicetree support

Signed-off-by: NThomas Chou <thomas@wytron.com.tw>
Reviewed-by: NGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b86fb2cf
......@@ -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
},
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册