]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/smc-ultra.c
Staging: PCC-ACPI: Fix all checkpatch errors
[linux-2.6-omap-h63xx.git] / drivers / net / smc-ultra.c
index 3db30cd0625e5fd7151f18af72b414bebe47e054..00d6cf1af4843a929f5856a40c8bf3af9b0b0c9b 100644 (file)
@@ -57,7 +57,6 @@
 static const char version[] =
        "smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -112,7 +111,7 @@ static struct isapnp_device_id ultra_device_ids[] __initdata = {
 MODULE_DEVICE_TABLE(isapnp, ultra_device_ids);
 #endif
 
-\f
+
 #define START_PG               0x00    /* First page of TX buffer */
 
 #define ULTRA_CMDREG   0               /* Offset to ASIC command register. */
@@ -123,12 +122,12 @@ MODULE_DEVICE_TABLE(isapnp, ultra_device_ids);
 #define ULTRA_NIC_OFFSET  16   /* NIC register offset from the base_addr. */
 #define ULTRA_IO_EXTENT 32
 #define EN0_ERWCNT             0x08    /* Early receive warning count. */
-\f
+
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void ultra_poll(struct net_device *dev)
 {
        disable_irq(dev->irq);
-       ei_interrupt(dev->irq, dev, NULL);
+       ei_interrupt(dev->irq, dev);
        enable_irq(dev->irq);
 }
 #endif
@@ -143,8 +142,6 @@ static int __init do_ultra_probe(struct net_device *dev)
        int base_addr = dev->base_addr;
        int irq = dev->irq;
 
-       SET_MODULE_OWNER(dev);
-
 #ifdef CONFIG_NET_POLL_CONTROLLER
        dev->poll_controller = &ultra_poll;
 #endif
@@ -201,6 +198,7 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
        unsigned char num_pages, irqreg, addr, piomode;
        unsigned char idreg = inb(ioaddr + 7);
        unsigned char reg4 = inb(ioaddr + 4) & 0x7f;
+       DECLARE_MAC_BUF(mac);
 
        if (!request_region(ioaddr, ULTRA_IO_EXTENT, DRV_NAME))
                return -EBUSY;
@@ -227,10 +225,11 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
 
        model_name = (idreg & 0xF0) == 0x20 ? "SMC Ultra" : "SMC EtherEZ";
 
-       printk("%s: %s at %#3x,", dev->name, model_name, ioaddr);
-
        for (i = 0; i < 6; i++)
-               printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i));
+               dev->dev_addr[i] = inb(ioaddr + 8 + i);
+
+       printk("%s: %s at %#3x, %s", dev->name, model_name,
+              ioaddr, print_mac(mac, dev->dev_addr));
 
        /* Switch from the station address to the alternate register set and
           read the useful registers there. */
@@ -455,8 +454,7 @@ ultra_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ri
                count -= semi_count;
                memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count);
        } else {
-               /* Packet is in one chunk -- we can copy + cksum. */
-               eth_io_copy_and_sum(skb, xfer_start, count, 0);
+               memcpy_fromio(skb->data, xfer_start, count);
        }
 
        outb(0x00, dev->base_addr - ULTRA_NIC_OFFSET);  /* Disable memory. */
@@ -537,7 +535,7 @@ ultra_close_card(struct net_device *dev)
        return 0;
 }
 
-\f
+
 #ifdef MODULE
 #define MAX_ULTRA_CARDS        4       /* Max number of Ultra cards per module */
 static struct net_device *dev_ultra[MAX_ULTRA_CARDS];
@@ -553,7 +551,7 @@ MODULE_LICENSE("GPL");
 
 /* This is set up so that only a single autoprobe takes place per call.
 ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
 init_module(void)
 {
        struct net_device *dev;
@@ -594,7 +592,7 @@ static void cleanup_card(struct net_device *dev)
        iounmap(ei_status.mem);
 }
 
-void
+void __exit
 cleanup_module(void)
 {
        int this_dev;