vserver 2.0 rc7
[linux-2.6.git] / drivers / net / appletalk / ltpc.c
index cc7476f..db4f369 100644 (file)
@@ -227,17 +227,17 @@ static int dma;
 #include <linux/delay.h>
 #include <linux/timer.h>
 #include <linux/atalk.h>
+#include <linux/bitops.h>
 
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/dma.h>
 #include <asm/io.h>
 
 /* our stuff */
 #include "ltpc.h"
 
-static spinlock_t txqueue_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t mbox_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(txqueue_lock);
+static DEFINE_SPINLOCK(mbox_lock);
 
 /* function prototypes */
 static int do_read(struct net_device *dev, void *cbuf, int cbuflen,
@@ -501,7 +501,7 @@ static void idle(struct net_device *dev)
        /* FIXME This is initialized to shut the warning up, but I need to
         * think this through again.
         */
-       struct xmitQel *q=0;
+       struct xmitQel *q = NULL;
        int oops;
        int i;
        int base = dev->base_addr;
@@ -1039,7 +1039,7 @@ struct net_device * __init ltpc_probe(void)
        unsigned long f;
        unsigned long timeout;
 
-       dev = alloc_netdev(sizeof(struct ltpc_private), "lt%d", ltalk_setup);
+       dev = alloc_ltalkdev(sizeof(struct ltpc_private));
        if (!dev)
                goto out;
 
@@ -1203,7 +1203,7 @@ struct net_device * __init ltpc_probe(void)
        if (err)
                goto out4;
 
-       return 0;
+       return NULL;
 out4:
        del_timer_sync(&ltpc_timer);
        if (dev->irq)
@@ -1257,10 +1257,10 @@ static struct net_device *dev_ltpc;
 #ifdef MODULE
 
 MODULE_LICENSE("GPL");
-MODULE_PARM(debug, "i");
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(dma, "i");
+module_param(debug, int, 0);
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
 
 
 int __init init_module(void)