diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2016-06-13 17:51:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-15 21:17:57 +0200 |
commit | d3cf8fd3fce1b425512f07b307855980379e0783 (patch) | |
tree | 6996b308d5bc7afe3317d5be22366661cc1c2014 /drivers/net/ethernet/cirrus | |
parent | act_police: rename tcf_act_police_locate() to tcf_act_police_init() (diff) | |
download | linux-d3cf8fd3fce1b425512f07b307855980379e0783.tar.xz linux-d3cf8fd3fce1b425512f07b307855980379e0783.zip |
net: cx89x0: Add DT support
Add DT support to the Cirrus Logic CS89x0 driver.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cirrus')
-rw-r--r-- | drivers/net/ethernet/cirrus/cs89x0.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cirrus/cs89x0.c b/drivers/net/ethernet/cirrus/cs89x0.c index 60383040d6c6..c363b58552e9 100644 --- a/drivers/net/ethernet/cirrus/cs89x0.c +++ b/drivers/net/ethernet/cirrus/cs89x0.c @@ -53,6 +53,8 @@ #include <linux/errno.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> +#include <linux/of.h> +#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/kernel.h> #include <linux/types.h> @@ -1895,9 +1897,17 @@ static int cs89x0_platform_remove(struct platform_device *pdev) return 0; } +static const struct __maybe_unused of_device_id cs89x0_match[] = { + { .compatible = "cirrus,cs8900", }, + { .compatible = "cirrus,cs8920", }, + { }, +}; +MODULE_DEVICE_TABLE(of, cs89x0_match); + static struct platform_driver cs89x0_driver = { .driver = { - .name = DRV_NAME, + .name = DRV_NAME, + .of_match_table = of_match_ptr(cs89x0_match), }, .remove = cs89x0_platform_remove, }; |