Commit 5518c524 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

ethernet: 8390/etherh: don't write directly to netdev->dev_addr

netdev->dev_addr is const now.

Compile tested rpc_defconfig w/ GCC 8.5.

Fixes: adeef3e3 ("net: constify netdev->dev_addr")
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 98ef22bb
...@@ -655,6 +655,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -655,6 +655,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
struct ei_device *ei_local; struct ei_device *ei_local;
struct net_device *dev; struct net_device *dev;
struct etherh_priv *eh; struct etherh_priv *eh;
u8 addr[ETH_ALEN];
int ret; int ret;
ret = ecard_request_resources(ec); ret = ecard_request_resources(ec);
...@@ -724,12 +725,13 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -724,12 +725,13 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
spin_lock_init(&ei_local->page_lock); spin_lock_init(&ei_local->page_lock);
if (ec->cid.product == PROD_ANT_ETHERM) { if (ec->cid.product == PROD_ANT_ETHERM) {
etherm_addr(dev->dev_addr); etherm_addr(addr);
ei_local->reg_offset = etherm_regoffsets; ei_local->reg_offset = etherm_regoffsets;
} else { } else {
etherh_addr(dev->dev_addr, ec); etherh_addr(addr, ec);
ei_local->reg_offset = etherh_regoffsets; ei_local->reg_offset = etherh_regoffsets;
} }
eth_hw_addr_set(dev, addr);
ei_local->name = dev->name; ei_local->name = dev->name;
ei_local->word16 = 1; ei_local->word16 = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment