Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83929
b: refs/heads/master
c: f83bb2d
h: refs/heads/master
i:
  83927: f2724f6
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Feb 7, 2008
1 parent ed5e442 commit f81ebe7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 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: 0ecd233bb6efa9745dffc6134ceab8aba1aa030b
refs/heads/master: f83bb2d40a879c21c5085ee8cfc426f9936901ee
27 changes: 12 additions & 15 deletions trunk/drivers/char/mxser_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,21 +1168,18 @@ static void mxser_flush_buffer(struct tty_struct *tty)
static int mxser_get_serial_info(struct mxser_port *info,
struct serial_struct __user *retinfo)
{
struct serial_struct tmp;

if (!retinfo)
return -EFAULT;
memset(&tmp, 0, sizeof(tmp));
tmp.type = info->type;
tmp.line = info->tty->index;
tmp.port = info->ioaddr;
tmp.irq = info->board->irq;
tmp.flags = info->flags;
tmp.baud_base = info->baud_base;
tmp.close_delay = info->close_delay;
tmp.closing_wait = info->closing_wait;
tmp.custom_divisor = info->custom_divisor;
tmp.hub6 = 0;
struct serial_struct tmp = {
.type = info->type,
.line = info->tty->index,
.port = info->ioaddr,
.irq = info->board->irq,
.flags = info->flags,
.baud_base = info->baud_base,
.close_delay = info->close_delay,
.closing_wait = info->closing_wait,
.custom_divisor = info->custom_divisor,
.hub6 = 0
};
if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
return -EFAULT;
return 0;
Expand Down

0 comments on commit f81ebe7

Please sign in to comment.