{
        int j, rev, ret;
        struct bmac_data *bp;
-       unsigned char *addr;
+       const unsigned char *prop_addr;
+       unsigned char addr[6];
        struct net_device *dev;
        int is_bmac_plus = ((int)match->data) != 0;
 
                printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n");
                return -ENODEV;
        }
-       addr = get_property(macio_get_of_node(mdev), "mac-address", NULL);
-       if (addr == NULL) {
-               addr = get_property(macio_get_of_node(mdev), "local-mac-address", NULL);
-               if (addr == NULL) {
+       prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL);
+       if (prop_addr == NULL) {
+               prop_addr = get_property(macio_get_of_node(mdev),
+                               "local-mac-address", NULL);
+               if (prop_addr == NULL) {
                        printk(KERN_ERR "BMAC: Can't get mac-address\n");
                        return -ENODEV;
                }
        }
+       memcpy(addr, prop_addr, sizeof(addr));
 
        dev = alloc_etherdev(PRIV_BYTES);
        if (!dev) {
 
        struct device_node *mace = macio_get_of_node(mdev);
        struct net_device *dev;
        struct mace_data *mp;
-       unsigned char *addr;
+       const unsigned char *addr;
        int j, rev, rc = -EBUSY;
 
        if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) {
 
  */
 static int
 spider_net_download_firmware(struct spider_net_card *card,
-                            u8 *firmware_ptr)
+                            const void *firmware_ptr)
 {
        int sequencer, i;
-       u32 *fw_ptr = (u32 *)firmware_ptr;
+       const u32 *fw_ptr = firmware_ptr;
 
        /* stop sequencers */
        spider_net_write_reg(card, SPIDER_NET_GSINIT,
 {
        struct firmware *firmware = NULL;
        struct device_node *dn;
-       u8 *fw_prop = NULL;
+       const u8 *fw_prop = NULL;
        int err = -ENOENT;
        int fw_size;
 
        if (!dn)
                goto out_err;
 
-       fw_prop = (u8 *)get_property(dn, "firmware", &fw_size);
+       fw_prop = get_property(dn, "firmware", &fw_size);
        if (!fw_prop)
                goto out_err;
 
        struct net_device *netdev = card->netdev;
        struct device_node *dn;
        struct sockaddr addr;
-       u8 *mac;
+       const u8 *mac;
 
        SET_MODULE_OWNER(netdev);
        SET_NETDEV_DEV(netdev, &card->pdev->dev);
        if (!dn)
                return -EIO;
 
-       mac = (u8 *)get_property(dn, "local-mac-address", NULL);
+       mac = get_property(dn, "local-mac-address", NULL);
        if (!mac)
                return -EIO;
        memcpy(addr.sa_data, mac, ETH_ALEN);
 
        if (use_idprom)
                memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
 #elif defined(CONFIG_PPC_PMAC)
-       unsigned char *addr;
+       const unsigned char *addr;
 
        addr = get_property(gp->of_node, "local-mac-address", NULL);
        if (addr == NULL) {