summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sbus/char/Kconfig14
-rw-r--r--drivers/sbus/char/aurora.c6
-rw-r--r--drivers/sbus/char/bbc_envctrl.c3
-rw-r--r--drivers/sbus/char/envctrl.c10
-rw-r--r--drivers/sbus/char/vfc_i2c.c8
5 files changed, 13 insertions, 28 deletions
diff --git a/drivers/sbus/char/Kconfig b/drivers/sbus/char/Kconfig
index 90d8ef1..a41778a 100644
--- a/drivers/sbus/char/Kconfig
+++ b/drivers/sbus/char/Kconfig
@@ -71,20 +71,6 @@ config SUN_JSFLASH
# XXX Why don't we do "source drivers/char/Config.in" somewhere?
# no shit
-config APM_RTC_IS_GMT
- bool
- depends on EXPERIMENTAL && SPARC32 && PCI
- default y
- help
- Say Y here if your RTC (Real Time Clock a.k.a. hardware clock)
- stores the time in GMT (Greenwich Mean Time). Say N if your RTC
- stores localtime.
-
- It is in fact recommended to store GMT in your RTC, because then you
- don't have to worry about daylight savings time changes. The only
- reason not to use GMT in your RTC is if you also run a broken OS
- that doesn't understand GMT.
-
config RTC
tristate "PC-style Real Time Clock Support"
depends on PCI && EXPERIMENTAL && SPARC32
diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c
index 650d5e9..d96cc47 100644
--- a/drivers/sbus/char/aurora.c
+++ b/drivers/sbus/char/aurora.c
@@ -1515,8 +1515,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
*/
timeout = jiffies+HZ;
while(port->SRER & SRER_TXEMPTY) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(port->timeout);
+ msleep_interruptible(jiffies_to_msecs(port->timeout));
if (time_after(jiffies, timeout))
break;
}
@@ -1533,8 +1532,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
port->tty = 0;
if (port->blocked_open) {
if (port->close_delay) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(port->close_delay);
+ msleep_interruptible(jiffies_to_msecs(port->close_delay));
}
wake_up_interruptible(&port->open_wait);
}
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
index d5259f7..b8a2c73 100644
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -4,13 +4,14 @@
* Copyright (C) 2001 David S. Miller (davem@redhat.com)
*/
+#define __KERNEL_SYSCALLS__
+
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <asm/oplib.h>
#include <asm/ebus.h>
-#define __KERNEL_SYSCALLS__
static int errno;
#include <asm/unistd.h>
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index f6ed35b..9a8c572 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -19,6 +19,8 @@
* Daniele Bellucci <bellucda@tiscali.it>
*/
+#define __KERNEL_SYSCALLS__
+
#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
@@ -35,7 +37,6 @@
#include <asm/uaccess.h>
#include <asm/envctrl.h>
-#define __KERNEL_SYSCALLS__
static int errno;
#include <asm/unistd.h>
@@ -1007,7 +1008,7 @@ static int kenvctrld(void *__unused)
return -ENODEV;
}
- poll_interval = 5 * HZ; /* TODO env_mon_interval */
+ poll_interval = 5000; /* TODO env_mon_interval */
daemonize("kenvctrld");
allow_signal(SIGKILL);
@@ -1016,10 +1017,7 @@ static int kenvctrld(void *__unused)
printk(KERN_INFO "envctrl: %s starting...\n", current->comm);
for (;;) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(poll_interval);
-
- if(signal_pending(current))
+ if(msleep_interruptible(poll_interval))
break;
for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) {
diff --git a/drivers/sbus/char/vfc_i2c.c b/drivers/sbus/char/vfc_i2c.c
index 95e3ceb..1faf1e7 100644
--- a/drivers/sbus/char/vfc_i2c.c
+++ b/drivers/sbus/char/vfc_i2c.c
@@ -88,14 +88,16 @@ void vfc_i2c_delay_wakeup(struct vfc_dev *dev)
void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs)
{
+ DEFINE_WAIT(wait);
init_timer(&dev->poll_timer);
- dev->poll_timer.expires = jiffies +
- ((unsigned long)usecs*(HZ))/1000000;
+ dev->poll_timer.expires = jiffies + usecs_to_jiffies(usecs);
dev->poll_timer.data=(unsigned long)dev;
dev->poll_timer.function=(void *)(unsigned long)vfc_i2c_delay_wakeup;
add_timer(&dev->poll_timer);
- sleep_on(&dev->poll_wait);
+ prepare_to_wait(&dev->poll_wait, &wait, TASK_UNINTERRUPTIBLE);
+ schedule();
del_timer(&dev->poll_timer);
+ finish_wait(&dev->poll_wait, &wait);
}
void inline vfc_i2c_delay(struct vfc_dev *dev)
OpenPOWER on IntegriCloud