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

Configure Feed

Select the types of activity you want to include in your feed.

net: davinci_emac: match the mdio device against its compatible if possible

Device tree based systems without of_dev_auxdata will have the mdio
device named differently than "davinci_mdio(.0)". In this case use the
device's parent's compatible string for matching

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Bartosz Golaszewski and committed by
David S. Miller
ea0820bb 6d8b8349

+4
+4
drivers/net/ethernet/ti/davinci_emac.c
··· 1387 1387 1388 1388 static int match_first_device(struct device *dev, void *data) 1389 1389 { 1390 + if (dev->parent && dev->parent->of_node) 1391 + return of_device_is_compatible(dev->parent->of_node, 1392 + "ti,davinci_mdio"); 1393 + 1390 1394 return !strncmp(dev_name(dev), "davinci_mdio", 12); 1391 1395 } 1392 1396