]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/speakup/devsynth.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[~andy/linux] / drivers / staging / speakup / devsynth.c
index 940769ef883fcb7d6cad69931bc66fb5490328f9..71c728acf4ca1c28892fa1beebbb5cdea2095f6a 100644 (file)
 static int misc_registered;
 static int dev_opened;
 
-static ssize_t speakup_file_write(struct file *fp, const char *buffer,
-                  size_t nbytes, loff_t *ppos)
+static ssize_t speakup_file_write(struct file *fp, const char __user *buffer,
+                                 size_t nbytes, loff_t *ppos)
 {
        size_t count = nbytes;
-       const char *ptr = buffer;
+       const char __user *ptr = buffer;
        size_t bytes;
        unsigned long flags;
        u_char buf[256];
@@ -30,15 +30,15 @@ static ssize_t speakup_file_write(struct file *fp, const char *buffer,
                        return -EFAULT;
                count -= bytes;
                ptr += bytes;
-               spk_lock(flags);
+               spin_lock_irqsave(&speakup_info.spinlock, flags);
                synth_write(buf, bytes);
-               spk_unlock(flags);
+               spin_unlock_irqrestore(&speakup_info.spinlock, flags);
        }
        return (ssize_t) nbytes;
 }
 
-static ssize_t speakup_file_read(struct file *fp, char *buf, size_t nbytes,
-       loff_t *ppos)
+static ssize_t speakup_file_read(struct file *fp, char __user *buf,
+                                size_t nbytes, loff_t *ppos)
 {
        return 0;
 }