fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / media / radio / miropcm20-rds.c
index 6b11044..c1b1db6 100644 (file)
@@ -14,6 +14,8 @@
 #include <linux/slab.h>
 #include <linux/fs.h>
 #include <linux/miscdevice.h>
+#include <linux/sched.h>       /* current, TASK_*, schedule_timeout() */
+#include <linux/delay.h>
 #include <asm/uaccess.h>
 #include "miropcm20-rds-core.h"
 
@@ -46,7 +48,7 @@ static int rds_f_release(struct inode *in, struct file *fi)
 
 static void print_matrix(char *ch, char out[])
 {
-        int j;
+       int j;
 
        for (j=7; j>=0; j--) {
                 out[7-j] = ((*ch >> j) & 0x1) + '0';
@@ -60,8 +62,7 @@ static ssize_t rds_f_read(struct file *file, char __user *buffer, size_t length,
        char c;
        char bits[8];
 
-       current->state=TASK_UNINTERRUPTIBLE;
-       schedule_timeout(2*HZ);
+       msleep(2000);
        aci_rds_cmd(RDS_STATUS, &c, 1);
        print_matrix(&c, bits);
        if (copy_to_user(buffer, bits, 8))
@@ -114,7 +115,6 @@ static struct file_operations rds_fops = {
 static struct miscdevice rds_miscdev = {
        .minor          = MISC_DYNAMIC_MINOR,
        .name           = "radiotext",
-       .devfs_name     = "v4l/rds/radiotext",
        .fops           = &rds_fops,
 };