fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / char / ds1620.c
index e2c4eca..48cb8f0 100644 (file)
@@ -2,7 +2,6 @@
  * linux/drivers/char/ds1620.c: Dallas Semiconductors DS1620
  *   thermometer driver (as used in the Rebel.com NetWinder)
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/miscdevice.h>
@@ -163,8 +162,7 @@ static void ds1620_out(int cmd, int bits, int value)
        netwinder_ds1620_reset();
        netwinder_unlock(&flags);
 
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(2);
+       msleep(20);
 }
 
 static unsigned int ds1620_in(int cmd, int bits)
@@ -338,7 +336,7 @@ proc_therm_ds1620_read(char *buf, char **start, off_t offset,
 static struct proc_dir_entry *proc_therm_ds1620;
 #endif
 
-static struct file_operations ds1620_fops = {
+static const struct file_operations ds1620_fops = {
        .owner          = THIS_MODULE,
        .open           = nonseekable_open,
        .read           = ds1620_read,
@@ -373,8 +371,7 @@ static int __init ds1620_init(void)
        th_start.hi = 1;
        ds1620_write_state(&th_start);
 
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(2*HZ);
+       msleep(2000);
 
        ds1620_write_state(&th);