forked from Ivasoft/openwrt
treewide: backport support for nvmem on non platform devices
In the current state, nvmem cells are only detected on platform device. To quickly fix the problem, we register the affected problematic driver with the of_platform but that is more an hack than a real solution. Backport from net-next the required patch so that nvmem can work also with non-platform devices and rework our current patch. Drop the mediatek and dsa workaround and rework the ath10k patches. Rework every driver that use the of_get_mac_address api. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
committed by
David Bauer
parent
edb6bc1990
commit
91a52f22a1
@@ -905,8 +905,6 @@ static int edma_axi_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
for_each_available_child_of_node(np, pnp) {
|
||||
const char *mac_addr;
|
||||
|
||||
/* this check is needed if parent and daughter dts have
|
||||
* different number of gmac nodes
|
||||
*/
|
||||
@@ -915,9 +913,7 @@ static int edma_axi_probe(struct platform_device *pdev)
|
||||
break;
|
||||
}
|
||||
|
||||
mac_addr = of_get_mac_address(pnp);
|
||||
if (!IS_ERR(mac_addr))
|
||||
memcpy(edma_netdev[idx_mac]->dev_addr, mac_addr, ETH_ALEN);
|
||||
of_get_mac_address(pnp, edma_netdev[idx_mac]->dev_addr);
|
||||
|
||||
idx_mac++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user