aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-07-31 03:37:44 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:37 -0400
commit6676ae62822f189e7bca80526eca514c399adcfc (patch)
treeb7c05dcc81b5cc91592c5f1c4e2b72773a1043d4 /arch/um/drivers
parent8daedea656ef48d36d1bda3d1339da484387c710 (diff)
UML: console should handle spurious IRQS
The previous DEBUG_SHIRQ patch missed one case. The console doesn't set its host descriptors non-blocking. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/chan_kern.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 368d3e97dfd9..629b00e3b0b0 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -157,7 +157,7 @@ static void tty_receive_char(struct tty_struct *tty, char ch)
157 157
158static int open_one_chan(struct chan *chan) 158static int open_one_chan(struct chan *chan)
159{ 159{
160 int fd; 160 int fd, err;
161 161
162 if(chan->opened) 162 if(chan->opened)
163 return 0; 163 return 0;
@@ -168,6 +168,13 @@ static int open_one_chan(struct chan *chan)
168 chan->data, &chan->dev); 168 chan->data, &chan->dev);
169 if(fd < 0) 169 if(fd < 0)
170 return fd; 170 return fd;
171
172 err = os_set_fd_block(fd, 0);
173 if (err) {
174 (*chan->ops->close)(fd, chan->data);
175 return err;
176 }
177
171 chan->fd = fd; 178 chan->fd = fd;
172 179
173 chan->opened = 1; 180 chan->opened = 1;