]> err.no Git - linux-2.6/blobdiff - drivers/net/arm/ether3.c
Merge branch 'drm-patches' of ssh://master.kernel.org/pub/scm/linux/kernel/git/airlie...
[linux-2.6] / drivers / net / arm / ether3.c
index 84686c8a5bc271aa706a985770c5e70708995043..da713500654da0d94331c7b9bcbeb981738ac81a 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/interrupt.h>
@@ -198,7 +197,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 +222,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 +271,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;
 
@@ -662,7 +661,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 +763,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;
 
@@ -795,8 +793,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
        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 +868,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 +882,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);
 }