git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
appletalk
/
ltpc.c
diff --git
a/drivers/net/appletalk/ltpc.c
b/drivers/net/appletalk/ltpc.c
index
cc7476f
..
2ea44ce
100644
(file)
--- a/
drivers/net/appletalk/ltpc.c
+++ b/
drivers/net/appletalk/ltpc.c
@@
-227,17
+227,17
@@
static int dma;
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/atalk.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/atalk.h>
+#include <linux/bitops.h>
#include <asm/system.h>
#include <asm/system.h>
-#include <asm/bitops.h>
#include <asm/dma.h>
#include <asm/io.h>
/* our stuff */
#include "ltpc.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,
/* 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.
*/
/* 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;
int oops;
int i;
int base = dev->base_addr;
@@
-790,7
+790,7
@@
static int sendup_buffer (struct net_device *dev)
/* the handler for the board interrupt */
static irqreturn_t
/* the handler for the board interrupt */
static irqreturn_t
-ltpc_interrupt(int irq, void *dev_id
, struct pt_regs *reg_ptr
)
+ltpc_interrupt(int irq, void *dev_id)
{
struct net_device *dev = dev_id;
{
struct net_device *dev = dev_id;
@@
-1039,7
+1039,7
@@
struct net_device * __init ltpc_probe(void)
unsigned long f;
unsigned long timeout;
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;
if (!dev)
goto out;
@@
-1109,8
+1109,7
@@
struct net_device * __init ltpc_probe(void)
inb_p(io+1);
inb_p(io+3);
inb_p(io+1);
inb_p(io+3);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(2*HZ/100);
+ msleep(20);
inb_p(io+0);
inb_p(io+2);
inb_p(io+0);
inb_p(io+2);
@@
-1120,8
+1119,7
@@
struct net_device * __init ltpc_probe(void)
inb_p(io+5); /* enable dma */
inb_p(io+6); /* tri-state interrupt line */
inb_p(io+5); /* enable dma */
inb_p(io+6); /* tri-state interrupt line */
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ);
+ ssleep(1);
/* now, figure out which dma channel we're using, unless it's
already been specified */
/* now, figure out which dma channel we're using, unless it's
already been specified */
@@
-1203,7
+1201,7
@@
struct net_device * __init ltpc_probe(void)
if (err)
goto out4;
if (err)
goto out4;
- return
0
;
+ return
NULL
;
out4:
del_timer_sync(<pc_timer);
if (dev->irq)
out4:
del_timer_sync(<pc_timer);
if (dev->irq)
@@
-1257,10
+1255,10
@@
static struct net_device *dev_ltpc;
#ifdef MODULE
MODULE_LICENSE("GPL");
#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)
int __init init_module(void)