upgrade to fedora-2.6.12-1.1398.FC4 + vserver 2.0.rc7
[linux-2.6.git] / arch / um / drivers / mconsole_kern.c
index 0c87589..d7c7adc 100644 (file)
@@ -73,11 +73,12 @@ DECLARE_WORK(mconsole_work, mc_work_proc, NULL);
 static irqreturn_t mconsole_interrupt(int irq, void *dev_id,
                                      struct pt_regs *regs)
 {
-       int fd;
+       /* long to avoid size mismatch warnings from gcc */
+       long fd;
        struct mconsole_entry *new;
        struct mc_request req;
 
-       fd = (int) dev_id;
+       fd = (long) dev_id;
        while (mconsole_get_request(fd, &req)){
                if(req.cmd->context == MCONSOLE_INTR)
                        (*req.cmd->handler)(&req);
@@ -457,7 +458,9 @@ static char *notify_socket = NULL;
 
 int mconsole_init(void)
 {
-       int err, sock;
+       /* long to avoid size mismatch warnings from gcc */
+       long sock;
+       int err;
        char file[256];
 
        if(umid_file_name("mconsole", file, sizeof(file))) return(-1);
@@ -496,7 +499,7 @@ int mconsole_init(void)
 
 __initcall(mconsole_init);
 
-static int write_proc_mconsole(struct file *file, const char *buffer,
+static int write_proc_mconsole(struct file *file, const char __user *buffer,
                               unsigned long count, void *data)
 {
        char *buf;
@@ -535,7 +538,7 @@ static int create_proc_mconsole(void)
        return(0);
 }
 
-static spinlock_t notify_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(notify_spinlock);
 
 void lock_notify(void)
 {