Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
[safe/jmp/linux-2.6] / drivers / net / hp100.c
index 03b3df3..571dd80 100644 (file)
@@ -8,7 +8,7 @@
 ** Extended for new busmaster capable chipsets by
 ** Siegfried "Frieder" Loeffler (dg1sek) <floeff@mathematik.uni-stuttgart.de>
 **
-** Maintained by: Jaroslav Kysela <perex@suse.cz>
+** Maintained by: Jaroslav Kysela <perex@perex.cz>
 **
 ** This driver has only been tested with
 ** -- HP J2585B 10/100 Mbit/s PCI Busmaster
@@ -188,10 +188,12 @@ struct hp100_private {
 /*
  *  variables
  */
+#ifdef CONFIG_ISA
 static const char *hp100_isa_tbl[] = {
        "HWPF150", /* HP J2573 rev A */
        "HWP1950", /* HP J2573 */
 };
+#endif
 
 #ifdef CONFIG_EISA
 static struct eisa_device_id hp100_eisa_tbl[] = {
@@ -247,7 +249,7 @@ static void hp100_misc_interrupt(struct net_device *dev);
 static void hp100_update_stats(struct net_device *dev);
 static void hp100_clear_stats(struct hp100_private *lp, int ioaddr);
 static void hp100_set_multicast_list(struct net_device *dev);
-static irqreturn_t hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t hp100_interrupt(int irq, void *dev_id);
 static void hp100_start_interface(struct net_device *dev);
 static void hp100_stop_interface(struct net_device *dev);
 static void hp100_load_eeprom(struct net_device *dev, u_short ioaddr);
@@ -333,6 +335,7 @@ static __devinit const char *hp100_read_id(int ioaddr)
        return str;
 }
 
+#ifdef CONFIG_ISA
 static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
 {
        const char *sig;
@@ -390,9 +393,9 @@ static int  __init hp100_isa_probe(struct net_device *dev, int addr)
        }
        return err;
 }
+#endif /* CONFIG_ISA */
 
-
-#ifndef MODULE
+#if !defined(MODULE) && defined(CONFIG_ISA)
 struct net_device * __init hp100_probe(int unit)
 {
        struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
@@ -401,8 +404,6 @@ struct net_device * __init hp100_probe(int unit)
        if (!dev)
                return ERR_PTR(-ENODEV);
 
-       SET_MODULE_OWNER(dev);
-
 #ifdef HP100_DEBUG_B
        hp100_outw(0x4200, TRACE);
        printk("hp100: %s: probe\n", dev->name);
@@ -422,7 +423,7 @@ struct net_device * __init hp100_probe(int unit)
        free_netdev(dev);
        return ERR_PTR(err);
 }
-#endif
+#endif /* !MODULE && CONFIG_ISA */
 
 static int __devinit hp100_probe1(struct net_device *dev, int ioaddr,
                                  u_char bus, struct pci_dev *pci_dev)
@@ -1152,7 +1153,7 @@ static void hp100_init_pdls(struct net_device *dev)
        printk("hp100: %s: init pdls\n", dev->name);
 #endif
 
-       if (0 == lp->page_vaddr_algn)
+       if (!lp->page_vaddr_algn)
                printk("hp100: %s: Warning: lp->page_vaddr_algn not initialised!\n", dev->name);
        else {
                /* pageptr shall point into the DMA accessible memory region  */
@@ -1813,7 +1814,6 @@ static void hp100_rx(struct net_device *dev)
                        u_char *ptr;
 
                        skb_reserve(skb,2);
-                       skb->dev = dev;
 
                        /* ptr to start of the sk_buff data area */
                        skb_put(skb, pkt_len);
@@ -2093,9 +2093,9 @@ static void hp100_set_multicast_list(struct net_device *dev)
                                addrs = dmi->dmi_addr;
                                if ((*addrs & 0x01) == 0x01) {  /* multicast address? */
 #ifdef HP100_DEBUG
-                                       printk("hp100: %s: multicast = %02x:%02x:%02x:%02x:%02x:%02x, ",
-                                                    dev->name, addrs[0], addrs[1], addrs[2],
-                                                    addrs[3], addrs[4], addrs[5]);
+                                       DECLARE_MAC_BUF(mac);
+                                       printk("hp100: %s: multicast = %s, ",
+                                                    dev->name, print_mac(mac, addrs));
 #endif
                                        for (j = idx = 0; j < 6; j++) {
                                                idx ^= *addrs++ & 0x3f;
@@ -2184,7 +2184,7 @@ static void hp100_set_multicast_list(struct net_device *dev)
  *  hardware interrupt handling
  */
 
-static irqreturn_t hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t hp100_interrupt(int irq, void *dev_id)
 {
        struct net_device *dev = (struct net_device *) dev_id;
        struct hp100_private *lp = netdev_priv(dev);
@@ -2841,7 +2841,6 @@ static int __init hp100_eisa_probe (struct device *gendev)
        if (!dev)
                return -ENOMEM;
 
-       SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, &edev->dev);
 
        err = hp100_probe1(dev, edev->base_addr + 0xC38, HP100_BUS_EISA, NULL);
@@ -2894,7 +2893,6 @@ static int __devinit hp100_pci_probe (struct pci_dev *pdev,
                goto out0;
        }
 
-       SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, &pdev->dev);
 
        pci_read_config_word(pdev, PCI_COMMAND, &pci_command);
@@ -2953,7 +2951,7 @@ static struct pci_driver hp100_pci_driver = {
  */
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, "
+MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>, "
               "Siegfried \"Frieder\" Loeffler (dg1sek) <floeff@mathematik.uni-stuttgart.de>");
 MODULE_DESCRIPTION("HP CASCADE Architecture Driver for 100VG-AnyLan Network Adapters");
 
@@ -2991,7 +2989,6 @@ static int __init hp100_isa_init(void)
 
                        return -ENOMEM;
                }
-               SET_MODULE_OWNER(dev);
 
                err = hp100_isa_probe(dev, hp100_port[i]);
                if (!err)
@@ -3003,7 +3000,7 @@ static int __init hp100_isa_init(void)
        return cards > 0 ? 0 : -ENODEV;
 }
 
-static void __exit hp100_isa_cleanup(void)
+static void hp100_isa_cleanup(void)
 {
        int i;
 
@@ -3031,7 +3028,7 @@ static int __init hp100_module_init(void)
                goto out2;
 #endif
 #ifdef CONFIG_PCI
-       err = pci_module_init(&hp100_pci_driver);
+       err = pci_register_driver(&hp100_pci_driver);
        if (err && err != -ENODEV)
                goto out3;
 #endif