diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-07-23 20:19:43 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2021-08-05 01:46:26 +0200 |
commit | 91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1 (patch) | |
tree | f28017e5a42615c51b599d6de96c9fb91d27d476 /target/linux/ramips/files | |
parent | edb6bc199049769be76bb3966debcc2b31511e4b (diff) | |
download | upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.tar.gz upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.tar.bz2 upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.zip |
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>
Diffstat (limited to 'target/linux/ramips/files')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index cf6d4806ed..e07e5ed5a8 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -1368,7 +1368,6 @@ static int __init fe_init(struct net_device *dev) { struct fe_priv *priv = netdev_priv(dev); struct device_node *port; - const char *mac_addr; int err; if (priv->soc->reset_fe) @@ -1389,9 +1388,7 @@ static int __init fe_init(struct net_device *dev) fe_reset_phy(priv); - mac_addr = of_get_mac_address(priv->dev->of_node); - if (!IS_ERR_OR_NULL(mac_addr)) - ether_addr_copy(dev->dev_addr, mac_addr); + of_get_mac_address(priv->dev->of_node, dev->dev_addr); /* If the mac address is invalid, use random mac address */ if (!is_valid_ether_addr(dev->dev_addr)) { |