static void ax_reset_8390(struct net_device *dev)
 {
        struct ei_device *ei_local = netdev_priv(dev);
-       struct ax_device *ax = to_ax_dev(dev);
        unsigned long reset_start_time = jiffies;
        void __iomem *addr = (void __iomem *)dev->base_addr;
 
        if (ei_debug > 1)
-               dev_dbg(&ax->dev->dev, "resetting the 8390 t=%ld\n", jiffies);
+               netdev_dbg(dev, "resetting the 8390 t=%ld\n", jiffies);
 
        ei_outb(ei_inb(addr + NE_RESET), addr + NE_RESET);
 
        /* This check _should_not_ be necessary, omit eventually. */
        while ((ei_inb(addr + EN0_ISR) & ENISR_RESET) == 0) {
                if (jiffies - reset_start_time > 2 * HZ / 100) {
-                       dev_warn(&ax->dev->dev, "%s: %s did not complete.\n",
-                              __func__, dev->name);
+                       netdev_warn(dev, "%s: did not complete.\n", __func__);
                        break;
                }
        }
                            int ring_page)
 {
        struct ei_device *ei_local = netdev_priv(dev);
-       struct ax_device *ax = to_ax_dev(dev);
        void __iomem *nic_base = ei_local->mem;
 
        /* This *shouldn't* happen. If it does, it's the last thing you'll see */
        if (ei_local->dmaing) {
-               dev_err(&ax->dev->dev, "%s: DMAing conflict in %s "
+               netdev_err(dev, "DMAing conflict in %s "
                        "[DMAstat:%d][irqlock:%d].\n",
-                       dev->name, __func__,
+                       __func__,
                        ei_local->dmaing, ei_local->irqlock);
                return;
        }
                           struct sk_buff *skb, int ring_offset)
 {
        struct ei_device *ei_local = netdev_priv(dev);
-       struct ax_device *ax = to_ax_dev(dev);
        void __iomem *nic_base = ei_local->mem;
        char *buf = skb->data;
 
        if (ei_local->dmaing) {
-               dev_err(&ax->dev->dev,
-                       "%s: DMAing conflict in %s "
+               netdev_err(dev,
+                       "DMAing conflict in %s "
                        "[DMAstat:%d][irqlock:%d].\n",
-                       dev->name, __func__,
+                       __func__,
                        ei_local->dmaing, ei_local->irqlock);
                return;
        }
                            const unsigned char *buf, const int start_page)
 {
        struct ei_device *ei_local = netdev_priv(dev);
-       struct ax_device *ax = to_ax_dev(dev);
        void __iomem *nic_base = ei_local->mem;
        unsigned long dma_start;
 
 
        /* This *shouldn't* happen. If it does, it's the last thing you'll see */
        if (ei_local->dmaing) {
-               dev_err(&ax->dev->dev, "%s: DMAing conflict in %s."
+               netdev_err(dev, "DMAing conflict in %s."
                        "[DMAstat:%d][irqlock:%d]\n",
-                       dev->name, __func__,
+                       __func__,
                       ei_local->dmaing, ei_local->irqlock);
                return;
        }
 
        while ((ei_inb(nic_base + EN0_ISR) & ENISR_RDC) == 0) {
                if (jiffies - dma_start > 2 * HZ / 100) {               /* 20ms */
-                       dev_warn(&ax->dev->dev,
-                                "%s: timeout waiting for Tx RDC.\n", dev->name);
+                       netdev_warn(dev, "timeout waiting for Tx RDC.\n");
                        ax_reset_8390(dev);
                        ax_NS8390_init(dev, 1);
                        break;
 ax_phy_issueaddr(struct net_device *dev, int phy_addr, int reg, int opc)
 {
        if (phy_debug)
-               pr_debug("%s: dev %p, %04x, %04x, %d\n",
+               netdev_dbg(dev, "%s: dev %p, %04x, %04x, %d\n",
                        __func__, dev, phy_addr, reg, opc);
 
        ax_mii_ei_outbits(dev, 0x3f, 6);        /* pre-amble */
        spin_unlock_irqrestore(&ei_local->page_lock, flags);
 
        if (phy_debug)
-               pr_debug("%s: %04x.%04x => read %04x\n", __func__,
+               netdev_dbg(dev, "%s: %04x.%04x => read %04x\n", __func__,
                         phy_addr, reg, result);
 
        return result;
 ax_phy_write(struct net_device *dev, int phy_addr, int reg, int value)
 {
        struct ei_device *ei = netdev_priv(dev);
-       struct ax_device *ax = to_ax_dev(dev);
        unsigned long flags;
 
-       dev_dbg(&ax->dev->dev, "%s: %p, %04x, %04x %04x\n",
+       netdev_dbg(dev, "%s: %p, %04x, %04x %04x\n",
                __func__, dev, phy_addr, reg, value);
 
        spin_lock_irqsave(&ei->page_lock, flags);
        struct ei_device *ei_local = netdev_priv(dev);
        int ret;
 
-       dev_dbg(&ax->dev->dev, "%s: open\n", dev->name);
+       netdev_dbg(dev, "open\n");
 
        ret = request_irq(dev->irq, ax_ei_interrupt, ax->irqflags,
                          dev->name, dev);
        struct ax_device *ax = to_ax_dev(dev);
        struct ei_device *ei_local = netdev_priv(dev);
 
-       dev_dbg(&ax->dev->dev, "%s: close\n", dev->name);
+       netdev_dbg(dev, "close\n");
 
        /* turn the phy off */
 
 
        ax_NS8390_init(dev, 0);
 
-       dev_info(&ax->dev->dev, "%dbit, irq %d, %lx, MAC: %pM\n",
-                ei_local->word16 ? 16 : 8, dev->irq, dev->base_addr,
-                dev->dev_addr);
-
        ret = register_netdev(dev);
        if (ret)
                goto out_irq;
 
+       netdev_info(dev, "%dbit, irq %d, %lx, MAC: %pM\n",
+                   ei_local->word16 ? 16 : 8, dev->irq, dev->base_addr,
+                   dev->dev_addr);
+
        return 0;
 
  out_irq:
                return -ENOMEM;
 
        /* ok, let's setup our device */
+       SET_NETDEV_DEV(dev, &pdev->dev);
        ei_local = netdev_priv(dev);
        ax = to_ax_dev(dev);