aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/windfarm_core.c10
-rw-r--r--drivers/serial/uartlite.c10
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 516d943227e2..075b4d99e354 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -94,7 +94,9 @@ static int wf_thread_func(void *data)
94 DBG("wf: thread started\n"); 94 DBG("wf: thread started\n");
95 95
96 set_freezable(); 96 set_freezable();
97 while(!kthread_should_stop()) { 97 while (!kthread_should_stop()) {
98 try_to_freeze();
99
98 if (time_after_eq(jiffies, next)) { 100 if (time_after_eq(jiffies, next)) {
99 wf_notify(WF_EVENT_TICK, NULL); 101 wf_notify(WF_EVENT_TICK, NULL);
100 if (wf_overtemp) { 102 if (wf_overtemp) {
@@ -116,12 +118,6 @@ static int wf_thread_func(void *data)
116 delay = next - jiffies; 118 delay = next - jiffies;
117 if (delay <= HZ) 119 if (delay <= HZ)
118 schedule_timeout_interruptible(delay); 120 schedule_timeout_interruptible(delay);
119
120 /* there should be no non-suspend signal, but oh well */
121 if (signal_pending(current) && !try_to_freeze()) {
122 printk(KERN_WARNING "windfarm: thread got sigl !\n");
123 break;
124 }
125 } 121 }
126 122
127 DBG("wf: thread stopped\n"); 123 DBG("wf: thread stopped\n");
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index dfef83f14960..a85f2d31a686 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -329,12 +329,14 @@ static struct uart_ops ulite_ops = {
329static void ulite_console_wait_tx(struct uart_port *port) 329static void ulite_console_wait_tx(struct uart_port *port)
330{ 330{
331 int i; 331 int i;
332 u8 val;
332 333
333 /* wait up to 10ms for the character(s) to be sent */ 334 /* Spin waiting for TX fifo to have space available */
334 for (i = 0; i < 10000; i++) { 335 for (i = 0; i < 100000; i++) {
335 if (readb(port->membase + ULITE_STATUS) & ULITE_STATUS_TXEMPTY) 336 val = readb(port->membase + ULITE_STATUS);
337 if ((val & ULITE_STATUS_TXFULL) == 0)
336 break; 338 break;
337 udelay(1); 339 cpu_relax();
338 } 340 }
339} 341}
340 342