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>
This commit is contained in:
parent
b86fb2cfe8
commit
682a169411
|
@ -81,6 +81,7 @@ static const char version[] =
|
||||||
#include <linux/ethtool.h>
|
#include <linux/ethtool.h>
|
||||||
#include <linux/mii.h>
|
#include <linux/mii.h>
|
||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#include <linux/netdevice.h>
|
#include <linux/netdevice.h>
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
|
@ -2394,6 +2395,15 @@ static int smc_drv_resume(struct device *dev)
|
||||||
return 0;
|
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 = {
|
static struct dev_pm_ops smc_drv_pm_ops = {
|
||||||
.suspend = smc_drv_suspend,
|
.suspend = smc_drv_suspend,
|
||||||
.resume = smc_drv_resume,
|
.resume = smc_drv_resume,
|
||||||
|
@ -2406,6 +2416,9 @@ static struct platform_driver smc_driver = {
|
||||||
.name = CARDNAME,
|
.name = CARDNAME,
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.pm = &smc_drv_pm_ops,
|
.pm = &smc_drv_pm_ops,
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
.of_match_table = smc91x_match,
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue