]> Pileus Git - ~andy/linux/blobdiff - drivers/net/ethernet/8390/ax88796.c
net: ax88796: use dev_get_platdata()
[~andy/linux] / drivers / net / ethernet / 8390 / ax88796.c
index e1d26433d61921b3e0460421212006bcb5e0e9ee..f92f001551dab53152bf276d189e88b1f984e3b5 100644 (file)
@@ -707,7 +707,7 @@ static int ax_init_dev(struct net_device *dev)
 
 #ifdef CONFIG_AX88796_93CX6
        if (ax->plat->flags & AXFLG_HAS_93CX6) {
-               unsigned char mac_addr[6];
+               unsigned char mac_addr[ETH_ALEN];
                struct eeprom_93cx6 eeprom;
 
                eeprom.data = ei_local;
@@ -719,7 +719,7 @@ static int ax_init_dev(struct net_device *dev)
                                       (__le16 __force *)mac_addr,
                                       sizeof(mac_addr) >> 1);
 
-               memcpy(dev->dev_addr, mac_addr, 6);
+               memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
        }
 #endif
        if (ax->plat->wordlength == 2) {
@@ -840,7 +840,7 @@ static int ax_probe(struct platform_device *pdev)
        ei_local = netdev_priv(dev);
        ax = to_ax_dev(dev);
 
-       ax->plat = pdev->dev.platform_data;
+       ax->plat = dev_get_platdata(&pdev->dev);
        platform_set_drvdata(pdev, dev);
 
        ei_local->rxcr_base = ax->plat->rcr_val;