Skip to content

Commit 682a169

Browse files
hippo5329davem330
authored andcommitted
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>
1 parent b86fb2c commit 682a169

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/net/smc91x.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static const char version[] =
8181
#include <linux/ethtool.h>
8282
#include <linux/mii.h>
8383
#include <linux/workqueue.h>
84+
#include <linux/of.h>
8485

8586
#include <linux/netdevice.h>
8687
#include <linux/etherdevice.h>
@@ -2394,6 +2395,15 @@ static int smc_drv_resume(struct device *dev)
23942395
return 0;
23952396
}
23962397

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+
23972407
static struct dev_pm_ops smc_drv_pm_ops = {
23982408
.suspend = smc_drv_suspend,
23992409
.resume = smc_drv_resume,
@@ -2406,6 +2416,9 @@ static struct platform_driver smc_driver = {
24062416
.name = CARDNAME,
24072417
.owner = THIS_MODULE,
24082418
.pm = &smc_drv_pm_ops,
2419+
#ifdef CONFIG_OF
2420+
.of_match_table = smc91x_match,
2421+
#endif
24092422
},
24102423
};
24112424

0 commit comments

Comments
 (0)