Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Chou and committed by
David S. Miller
682a1694 b86fb2cf

+13
+13
drivers/net/smc91x.c
··· 81 81 #include <linux/ethtool.h> 82 82 #include <linux/mii.h> 83 83 #include <linux/workqueue.h> 84 + #include <linux/of.h> 84 85 85 86 #include <linux/netdevice.h> 86 87 #include <linux/etherdevice.h> ··· 2395 2394 return 0; 2396 2395 } 2397 2396 2397 + #ifdef CONFIG_OF 2398 + static const struct of_device_id smc91x_match[] = { 2399 + { .compatible = "smsc,lan91c94", }, 2400 + { .compatible = "smsc,lan91c111", }, 2401 + {}, 2402 + } 2403 + MODULE_DEVICE_TABLE(of, smc91x_match); 2404 + #endif 2405 + 2398 2406 static struct dev_pm_ops smc_drv_pm_ops = { 2399 2407 .suspend = smc_drv_suspend, 2400 2408 .resume = smc_drv_resume, ··· 2416 2406 .name = CARDNAME, 2417 2407 .owner = THIS_MODULE, 2418 2408 .pm = &smc_drv_pm_ops, 2409 + #ifdef CONFIG_OF 2410 + .of_match_table = smc91x_match, 2411 + #endif 2419 2412 }, 2420 2413 }; 2421 2414