]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/tokenring/madgemc.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6-omap-h63xx.git] / drivers / net / tokenring / madgemc.c
index f8f4d74f01f1e4959640d8dc0ad35fcd15afe4dd..c9c5a2b1ed9e9ea6a49d8e5f2af22e9799adb403 100644 (file)
@@ -11,7 +11,7 @@
  *     - Madge Smart 16/4 Ringnode MC32 (??)
  *
  *  Maintainer(s):
- *    AF       Adam Fritzler           mid@auk.cx
+ *    AF       Adam Fritzler
  *
  *  Modification History:
  *     16-Jan-00       AF      Created
@@ -151,7 +151,8 @@ static int __devinit madgemc_probe(struct device *device)
        struct net_local *tp;
        struct card_info *card;
        struct mca_device *mdev = to_mca_device(device);
-       int ret = 0, i = 0;
+       int ret = 0;
+       DECLARE_MAC_BUF(mac);
 
        if (versionprinted++ == 0)
                printk("%s", version);
@@ -168,7 +169,6 @@ static int __devinit madgemc_probe(struct device *device)
                goto getout;
        }
 
-       SET_MODULE_OWNER(dev);
        dev->dma = 0;
 
        card = kmalloc(sizeof(struct card_info), GFP_KERNEL);
@@ -323,11 +323,8 @@ static int __devinit madgemc_probe(struct device *device)
        mca_device_set_name(mdev, (card->cardtype == 0x08)?MADGEMC16_CARDNAME:MADGEMC32_CARDNAME);
        mca_set_adapter_procfn(mdev->slot, madgemc_mcaproc, dev);
 
-       printk("%s:     Ring Station Address: ", dev->name);
-       printk("%2.2x", dev->dev_addr[0]);
-       for (i = 1; i < 6; i++)
-               printk(":%2.2x", dev->dev_addr[i]);
-       printk("\n");
+       printk("%s:     Ring Station Address: %s\n",
+              dev->name, print_mac(mac, dev->dev_addr));
 
        if (tmsdev_init(dev, device)) {
                printk("%s: unable to get memory for dev->priv.\n", 
@@ -690,14 +687,14 @@ static int madgemc_close(struct net_device *dev)
 static int madgemc_mcaproc(char *buf, int slot, void *d) 
 {      
        struct net_device *dev = (struct net_device *)d;
-       struct net_local *tp = dev->priv;
+       struct net_local *tp = netdev_priv(dev);
        struct card_info *curcard = tp->tmspriv;
        int len = 0;
+       DECLARE_MAC_BUF(mac);
        
        len += sprintf(buf+len, "-------\n");
        if (curcard) {
                struct net_local *tp = netdev_priv(dev);
-               int i;
                
                len += sprintf(buf+len, "Card Revision: %d\n", curcard->cardrev);
                len += sprintf(buf+len, "RAM Size: %dkb\n", curcard->ramsize);
@@ -717,11 +714,8 @@ static int madgemc_mcaproc(char *buf, int slot, void *d)
                }
                len += sprintf(buf+len, " (%s)\n", (curcard->fairness)?"Unfair":"Fair");
                
-               len += sprintf(buf+len, "Ring Station Address: ");
-               len += sprintf(buf+len, "%2.2x", dev->dev_addr[0]);
-               for (i = 1; i < 6; i++)
-                       len += sprintf(buf+len, " %2.2x", dev->dev_addr[i]);
-               len += sprintf(buf+len, "\n");
+               len += sprintf(buf+len, "Ring Station Address: %s\n",
+                              print_mac(mac, dev->dev_addr));
        } else 
                len += sprintf(buf+len, "Card not configured\n");
 
@@ -736,7 +730,7 @@ static int __devexit madgemc_remove(struct device *device)
 
        BUG_ON(!dev);
 
-       tp = dev->priv;
+       tp = netdev_priv(dev);
        card = tp->tmspriv;
        kfree(card);
        tp->tmspriv = NULL;