]> git.baikalelectronics.ru Git - kernel.git/commit
net: core: recursively find netdev by device node
authorTobias Waldekranz <tobias@waldekranz.com>
Fri, 15 May 2020 09:52:52 +0000 (11:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 May 2020 17:18:49 +0000 (10:18 -0700)
commit4087fba40ce1a7f14c834aedb796964196a874e3
tree0587fcc00ad19a9a1cc43b7652ad243ef6a6ef10
parent5edacf7f85acc02131bb2121d6decb20d45aaaf8
net: core: recursively find netdev by device node

The assumption that a device node is associated either with the
netdev's device, or the parent of that device, does not hold for all
drivers. E.g. Freescale's DPAA has two layers of platform devices
above the netdev. Instead, recursively walk up the tree from the
netdev, allowing any parent to match against the sought after node.

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c