summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPhil Elwell <phil@raspberrypi.org>2015-02-27 15:10:24 +0000
committerpopcornmix <popcornmix@gmail.com>2015-05-18 14:12:04 +0100
commit3e42b34efb6cf0a5b55f200c808f988f6aebc894 (patch)
tree9d95814433987400351abd1ab83266879344f5b4 /drivers
parentb550a421db51a2ca76ba11fbb5d25faaefbdf582 (diff)
downloadlinux-3e42b34efb6cf0a5b55f200c808f988f6aebc894.tar.gz
enc28j60: Add device tree compatible string and an overlay
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/microchip/enc28j60.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c
index b1b5f66b8b69..c6b6e1a3d282 100644
--- a/drivers/net/ethernet/microchip/enc28j60.c
+++ b/drivers/net/ethernet/microchip/enc28j60.c
@@ -1630,10 +1630,21 @@ static int enc28j60_remove(struct spi_device *spi)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id enc28j60_of_match[] = {
+ { .compatible = "microchip,enc28j60", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, enc28j60_of_match);
+#endif
+
static struct spi_driver enc28j60_driver = {
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
+#ifdef CONFIG_OF
+ .of_match_table = enc28j60_of_match,
+#endif
},
.probe = enc28j60_probe,
.remove = enc28j60_remove,