diff options
Diffstat (limited to 'drivers/net/ethernet/sun/sunhme.c')
-rw-r--r-- | drivers/net/ethernet/sun/sunhme.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 0dbf46f..e37b587 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2675,10 +2675,10 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe) addr = of_get_property(dp, "local-mac-address", &len); - if (qfe_slot != -1 && addr && len == ETH_ALEN) - memcpy(dev->dev_addr, addr, ETH_ALEN); + if (qfe_slot != -1 && addr && len == 6) + memcpy(dev->dev_addr, addr, 6); else - memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN); + memcpy(dev->dev_addr, idprom->id_ethaddr, 6); } hp = netdev_priv(dev); @@ -3024,9 +3024,9 @@ static int happy_meal_pci_probe(struct pci_dev *pdev, (addr = of_get_property(dp, "local-mac-address", &len)) != NULL && len == 6) { - memcpy(dev->dev_addr, addr, ETH_ALEN); + memcpy(dev->dev_addr, addr, 6); } else { - memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN); + memcpy(dev->dev_addr, idprom->id_ethaddr, 6); } #else get_hme_mac_nonsparc(pdev, &dev->dev_addr[0]); @@ -3170,6 +3170,8 @@ static void happy_meal_pci_remove(struct pci_dev *pdev) pci_release_regions(hp->happy_dev); free_netdev(net_dev); + + pci_set_drvdata(pdev, NULL); } static DEFINE_PCI_DEVICE_TABLE(happymeal_pci_ids) = { |