ide: fix ide_find_dma_mode() to print human-readable info
[safe/jmp/linux-2.6] / drivers / net / 3c509.c
index f791bf0..edda6e1 100644 (file)
@@ -83,7 +83,6 @@ static int max_interrupt_work = 10;
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/pm.h>
-#include <linux/pm_legacy.h>
 #include <linux/skbuff.h>
 #include <linux/delay.h>       /* for udelay() */
 #include <linux/spinlock.h>
@@ -96,8 +95,7 @@ static int max_interrupt_work = 10;
 #include <asm/io.h>
 #include <asm/irq.h>
 
-static char versionA[] __initdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n";
-static char versionB[] __initdata = "http://www.scyld.com/network/3c509.html\n";
+static char version[] __initdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n";
 
 #if defined(CONFIG_PM) && (defined(CONFIG_MCA) || defined(CONFIG_EISA))
 #define EL3_SUSPEND
@@ -301,7 +299,7 @@ static struct isapnp_device_id el3_isapnp_adapters[] __initdata = {
        { }     /* terminate list */
 };
 
-static u16 el3_isapnp_phys_addr[8][3];
+static __be16 el3_isapnp_phys_addr[8][3];
 static int nopnp;
 #endif /* __ISAPNP__ */
 
@@ -315,8 +313,9 @@ static int nopnp;
 static int __init el3_common_init(struct net_device *dev)
 {
        struct el3_private *lp = netdev_priv(dev);
-       short i;
        int err;
+       DECLARE_MAC_BUF(mac);
+       const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
 
        spin_lock_init(&lp->lock);
 
@@ -348,20 +347,13 @@ static int __init el3_common_init(struct net_device *dev)
                return err;
        }
 
-       {
-               const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
-               printk("%s: 3c5x9 found at %#3.3lx, %s port, address ",
-                       dev->name, dev->base_addr,
-                       if_names[(dev->if_port & 0x03)]);
-       }
-
-       /* Read in the station address. */
-       for (i = 0; i < 6; i++)
-               printk(" %2.2x", dev->dev_addr[i]);
-       printk(", IRQ %d.\n", dev->irq);
+       printk(KERN_INFO "%s: 3c5x9 found at %#3.3lx, %s port, "
+              "address %s, IRQ %d.\n",
+              dev->name, dev->base_addr, if_names[(dev->if_port & 0x03)],
+              print_mac(mac, dev->dev_addr), dev->irq);
 
        if (el3_debug > 0)
-               printk(KERN_INFO "%s" KERN_INFO "%s", versionA, versionB);
+               printk(KERN_INFO "%s", version);
        return 0;
 
 }
@@ -387,7 +379,7 @@ static int __init el3_probe(int card_idx)
        struct el3_private *lp;
        short lrs_state = 0xff, i;
        int ioaddr, irq, if_port;
-       u16 phys_addr[3];
+       __be16 phys_addr[3];
        static int current_tag;
        int err = -ENODEV;
 #if defined(__ISAPNP__)
@@ -434,7 +426,6 @@ __again:
                                        return -ENOMEM;
                        }
 
-                       SET_MODULE_OWNER(dev);
                        SET_NETDEV_DEV(dev, &idev->dev);
                        pnp_cards++;
 
@@ -526,8 +517,6 @@ no_pnp:
        if (!dev)
                return -ENOMEM;
 
-       SET_MODULE_OWNER(dev);
-
        netdev_boot_setup_check(dev);
 
        /* Set passed-in IRQ or I/O Addr. */
@@ -646,7 +635,6 @@ static int __init el3_mca_probe(struct device *device)
                        return -ENOMEM;
        }
 
-       SET_MODULE_OWNER(dev);
        netdev_boot_setup_check(dev);
 
        memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
@@ -706,8 +694,6 @@ static int __init el3_eisa_probe (struct device *device)
                return -ENOMEM;
        }
 
-       SET_MODULE_OWNER(dev);
-
        netdev_boot_setup_check(dev);
 
        memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
@@ -1091,7 +1077,6 @@ el3_rx(struct net_device *dev)
                                printk("Receiving packet size %d status %4.4x.\n",
                                           pkt_len, rx_status);
                        if (skb != NULL) {
-                               skb->dev = dev;
                                skb_reserve(skb, 2);     /* Align IP on 16 byte */
 
                                /* 'skb->data' points to the start of sk_buff data area. */