ax88796: use netdev_<LEVEL> instead of dev_<LEVEL> and pr_<LEVEL>

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index eac5b10..1370cac 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -143,12 +143,11 @@
 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);
 
@@ -158,8 +157,7 @@
 	/* 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;
 		}
 	}
@@ -172,14 +170,13 @@
 			    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;
 	}
@@ -217,15 +214,14 @@
 			   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;
 	}
@@ -255,7 +251,6 @@
 			    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;
 
@@ -269,9 +264,9 @@
 
 	/* 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;
 	}
@@ -298,8 +293,7 @@
 
 	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;
@@ -404,7 +398,7 @@
 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 */
@@ -431,7 +425,7 @@
 	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;
@@ -441,10 +435,9 @@
 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);
@@ -478,7 +471,7 @@
 	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);
@@ -514,7 +507,7 @@
 	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 */
 
@@ -785,14 +778,14 @@
 
 	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:
@@ -849,6 +842,7 @@
 		return -ENOMEM;
 
 	/* ok, let's setup our device */
+	SET_NETDEV_DEV(dev, &pdev->dev);
 	ei_local = netdev_priv(dev);
 	ax = to_ax_dev(dev);