Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260015
b: refs/heads/master
c: b041267
h: refs/heads/master
i:
  260013: a2b183d
  260011: c253366
  260007: a668533
  259999: d2d985d
v: v3
  • Loading branch information
Ravishankar authored and Greg Kroah-Hartman committed Jul 8, 2011
1 parent e55d630 commit b2c8eaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbecb8bf564f706e7b4346d54be8a39f0309b91c
refs/heads/master: b041267ea819054aa9b406efc94fe8821ea2e67b
15 changes: 6 additions & 9 deletions trunk/drivers/staging/comedi/drivers/serial2002.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Status: in development
#include <linux/sched.h>
#include <linux/slab.h>

#include <asm/termios.h>
#include <linux/termios.h>
#include <asm/ioctls.h>
#include <linux/serial.h>
#include <linux/poll.h>
Expand Down Expand Up @@ -192,9 +192,8 @@ static int tty_read(struct file *f, int timeout)
elapsed =
(1000000 * (now.tv_sec - start.tv_sec) +
now.tv_usec - start.tv_usec);
if (elapsed > timeout) {
if (elapsed > timeout)
break;
}
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(((timeout -
elapsed) * HZ) / 10000);
Expand All @@ -204,9 +203,8 @@ static int tty_read(struct file *f, int timeout)
unsigned char ch;

f->f_pos = 0;
if (f->f_op->read(f, &ch, 1, &f->f_pos) == 1) {
if (f->f_op->read(f, &ch, 1, &f->f_pos) == 1)
result = ch;
}
}
} else {
/* Device does not support poll, busy wait */
Expand All @@ -215,9 +213,8 @@ static int tty_read(struct file *f, int timeout)
unsigned char ch;

retries++;
if (retries >= timeout) {
if (retries >= timeout)
break;
}

f->f_pos = 0;
if (f->f_op->read(f, &ch, 1, &f->f_pos) == 1) {
Expand Down Expand Up @@ -329,7 +326,7 @@ static struct serial_data serial_read(struct file *f, int timeout)

length++;
if (data < 0) {
printk("serial2002 error\n");
printk(KERN_ERR "serial2002 error\n");
break;
} else if (data & 0x80) {
result.value = (result.value << 7) | (data & 0x7f);
Expand Down Expand Up @@ -402,7 +399,7 @@ static int serial_2002_open(struct comedi_device *dev)
devpriv->tty = filp_open(port, O_RDWR, 0);
if (IS_ERR(devpriv->tty)) {
result = (int)PTR_ERR(devpriv->tty);
printk("serial_2002: file open error = %d\n", result);
printk(KERN_ERR "serial_2002: file open error = %d\n", result);
} else {
struct config_t {

Expand Down

0 comments on commit b2c8eaf

Please sign in to comment.