]> Git Repo - linux.git/blobdiff - drivers/net/arm/ether3.c
[NET]: Nuke SET_MODULE_OWNER macro.
[linux.git] / drivers / net / arm / ether3.c
index 84686c8a5bc271aa706a985770c5e70708995043..4a914748c0e4fd0487cdd95a41ab96e8a839ca24 100644 (file)
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/interrupt.h>
-#include <linux/ptrace.h>
 #include <linux/ioport.h>
 #include <linux/in.h>
 #include <linux/slab.h>
@@ -70,7 +68,7 @@
 #include <asm/ecard.h>
 #include <asm/io.h>
 
-static char version[] __initdata = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n";
+static char version[] __devinitdata = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n";
 
 #include "ether3.h"
 
@@ -198,7 +196,7 @@ static inline void ether3_ledon(struct net_device *dev)
  * Read the ethernet address string from the on board rom.
  * This is an ascii string!!!
  */
-static int __init
+static int __devinit
 ether3_addr(char *addr, struct expansion_card *ec)
 {
        struct in_chunk_dir cd;
@@ -223,7 +221,7 @@ ether3_addr(char *addr, struct expansion_card *ec)
 
 /* --------------------------------------------------------------------------- */
 
-static int __init
+static int __devinit
 ether3_ramtest(struct net_device *dev, unsigned char byte)
 {
        unsigned char *buffer = kmalloc(RX_END, GFP_KERNEL);
@@ -272,7 +270,7 @@ ether3_ramtest(struct net_device *dev, unsigned char byte)
 
 /* ------------------------------------------------------------------------------- */
 
-static int __init ether3_init_2(struct net_device *dev)
+static int __devinit ether3_init_2(struct net_device *dev)
 {
        int i;
 
@@ -465,7 +463,7 @@ static void ether3_setmulticastlist(struct net_device *dev)
        if (dev->flags & IFF_PROMISC) {
                /* promiscuous mode */
                priv(dev)->regs.config1 |= CFG1_RECVPROMISC;
-       } else if (dev->flags & IFF_ALLMULTI) {
+       } else if (dev->flags & IFF_ALLMULTI || dev->mc_count) {
                priv(dev)->regs.config1 |= CFG1_RECVSPECBRMULTI;
        } else
                priv(dev)->regs.config1 |= CFG1_RECVSPECBROAD;
@@ -662,7 +660,6 @@ if (next_ptr < RX_START || next_ptr >= RX_END) {
                        if (skb) {
                                unsigned char *buf;
 
-                               skb->dev = dev;
                                skb_reserve(skb, 2);
                                buf = skb_put(skb, length);
                                ether3_readbuffer(dev, buf + 12, length - 12);
@@ -765,7 +762,7 @@ static void ether3_tx(struct net_device *dev)
        }
 }
 
-static void __init ether3_banner(void)
+static void __devinit ether3_banner(void)
 {
        static unsigned version_printed = 0;
 
@@ -792,11 +789,9 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
                goto release;
        }
 
-       SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, &ec->dev);
 
-       priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC),
-                                 ecard_resource_len(ec, ECARD_RES_MEMC));
+       priv(dev)->base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
        if (!priv(dev)->base) {
                ret = -ENOMEM;
                goto free;
@@ -871,8 +866,6 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
        return 0;
 
  free:
-       if (priv(dev)->base)
-               iounmap(priv(dev)->base);
        free_netdev(dev);
  release:
        ecard_release_resources(ec);
@@ -887,7 +880,6 @@ static void __devexit ether3_remove(struct expansion_card *ec)
        ecard_set_drvdata(ec, NULL);
 
        unregister_netdev(dev);
-       iounmap(priv(dev)->base);
        free_netdev(dev);
        ecard_release_resources(ec);
 }
This page took 0.041788 seconds and 4 git commands to generate.