aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r--drivers/char/moxa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 1ab9517c24c5..585fac179ec6 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -1280,6 +1280,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
1280 */ 1280 */
1281 if (ch == NULL) 1281 if (ch == NULL)
1282 return 0; 1282 return 0;
1283 lock_kernel();
1283 chars = MoxaPortTxQueue(ch); 1284 chars = MoxaPortTxQueue(ch);
1284 if (chars) { 1285 if (chars) {
1285 /* 1286 /*
@@ -1289,6 +1290,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
1289 if (!(ch->statusflags & EMPTYWAIT)) 1290 if (!(ch->statusflags & EMPTYWAIT))
1290 moxa_setup_empty_event(tty); 1291 moxa_setup_empty_event(tty);
1291 } 1292 }
1293 unlock_kernel();
1292 return chars; 1294 return chars;
1293} 1295}
1294 1296