fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / um / drivers / hostaudio_kern.c
index 59602b8..a0d148e 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/module.h"
 #include "linux/init.h"
 #include "linux/slab.h"
@@ -67,8 +66,8 @@ MODULE_PARM_DESC(mixer, MIXER_HELP);
 
 /* /dev/dsp file operations */
 
-static ssize_t hostaudio_read(struct file *file, char *buffer, size_t count, 
-                             loff_t *ppos)
+static ssize_t hostaudio_read(struct file *file, char __user *buffer,
+                             size_t count, loff_t *ppos)
 {
         struct hostaudio_state *state = file->private_data;
        void *kbuf;
@@ -94,7 +93,7 @@ static ssize_t hostaudio_read(struct file *file, char *buffer, size_t count,
        return(err);
 }
 
-static ssize_t hostaudio_write(struct file *file, const char *buffer, 
+static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
                               size_t count, loff_t *ppos)
 {
         struct hostaudio_state *state = file->private_data;
@@ -152,7 +151,7 @@ static int hostaudio_ioctl(struct inode *inode, struct file *file,
        case SNDCTL_DSP_CHANNELS:
        case SNDCTL_DSP_SUBDIVIDE:
        case SNDCTL_DSP_SETFRAGMENT:
-               if(get_user(data, (int *) arg))
+               if(get_user(data, (int __user *) arg))
                        return(-EFAULT);
                break;
        default:
@@ -168,7 +167,7 @@ static int hostaudio_ioctl(struct inode *inode, struct file *file,
        case SNDCTL_DSP_CHANNELS:
        case SNDCTL_DSP_SUBDIVIDE:
        case SNDCTL_DSP_SETFRAGMENT:
-               if(put_user(data, (int *) arg))
+               if(put_user(data, (int __user *) arg))
                        return(-EFAULT);
                break;
        default:
@@ -280,7 +279,7 @@ static int hostmixer_release(struct inode *inode, struct file *file)
 
 /* kernel module operations */
 
-static struct file_operations hostaudio_fops = {
+static const struct file_operations hostaudio_fops = {
         .owner          = THIS_MODULE,
         .llseek         = no_llseek,
         .read           = hostaudio_read,
@@ -292,7 +291,7 @@ static struct file_operations hostaudio_fops = {
         .release        = hostaudio_release,
 };
 
-static struct file_operations hostmixer_fops = {
+static const struct file_operations hostmixer_fops = {
         .owner          = THIS_MODULE,
         .llseek         = no_llseek,
         .ioctl          = hostmixer_ioctl_mixdev,