Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / um / drivers / hostaudio_kern.c
index 7f965c8..37232f9 100644 (file)
 #include "os.h"
 
 struct hostaudio_state {
-       int fd;
+  int fd;
 };
 
 struct hostmixer_state {
-       int fd;
+  int fd;
 };
 
 #define HOSTAUDIO_DEV_DSP "/dev/sound/dsp"
@@ -57,18 +57,18 @@ __uml_setup("mixer=", set_mixer, "mixer=<mixer device>\n" MIXER_HELP);
 
 #else /*MODULE*/
 
-MODULE_PARM(dsp, "s");
+module_param(dsp, charp, 0644);
 MODULE_PARM_DESC(dsp, DSP_HELP);
 
-MODULE_PARM(mixer, "s");
+module_param(mixer, charp, 0644);
 MODULE_PARM_DESC(mixer, MIXER_HELP);
 
 #endif
 
 /* /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 +94,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 +152,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 +168,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:
@@ -189,7 +189,7 @@ static int hostaudio_open(struct inode *inode, struct file *file)
 #endif
 
         state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
-        if(state == NULL) 
+        if(state == NULL)
                return(-ENOMEM);
 
         if(file->f_mode & FMODE_READ) r = 1;
@@ -214,10 +214,10 @@ static int hostaudio_release(struct inode *inode, struct file *file)
         printk("hostaudio: release called\n");
 #endif
 
-       os_close_file(state->fd);
+               os_close_file(state->fd);
         kfree(state);
 
-        return(0);
+       return(0);
 }
 
 /* /dev/mixer file operations */
@@ -271,10 +271,10 @@ static int hostmixer_release(struct inode *inode, struct file *file)
         printk("hostmixer: release called\n");
 #endif
 
-       os_close_file(state->fd);
+               os_close_file(state->fd);
         kfree(state);
 
-        return(0);
+       return(0);
 }