vserver 1.9.3
[linux-2.6.git] / drivers / net / arcnet / arcnet.c
index 57c1b7d..5d30467 100644 (file)
@@ -401,7 +401,8 @@ static int arcnet_open(struct net_device *dev)
        lp->rfc1201.sequence = 1;
 
        /* bring up the hardware driver */
-       lp->hw.open(dev);
+       if (lp->hw.open)
+               lp->hw.open(dev);
 
        if (dev->dev_addr[0] == 0)
                BUGMSG(D_NORMAL, "WARNING!  Station address 00 is reserved "
@@ -479,7 +480,7 @@ static int arcnet_header(struct sk_buff *skb, struct net_device *dev,
                *(uint16_t *) skb_push(skb, 2) = type;
                if (skb->nh.raw - skb->mac.raw != 2)
                        BUGMSG(D_NORMAL, "arcnet_header: Yikes!  diff (%d) is not 2!\n",
-                              skb->nh.raw - skb->mac.raw);
+                              (int)(skb->nh.raw - skb->mac.raw));
                return -2;      /* return error -- can't transmit yet! */
        }
        /* otherwise, we can just add the header as usual. */
@@ -514,7 +515,7 @@ static int arcnet_rebuild_header(struct sk_buff *skb)
        if (skb->nh.raw - skb->mac.raw != 2) {
                BUGMSG(D_NORMAL,
                     "rebuild_header: shouldn't be here! (hdrsize=%d)\n",
-                      skb->nh.raw - skb->mac.raw);
+                    (int)(skb->nh.raw - skb->mac.raw));
                return 0;
        }
        type = *(uint16_t *) skb_pull(skb, 2);