Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113441
b: refs/heads/master
c: 5aaa70a
h: refs/heads/master
i:
  113439: 078fed6
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Oct 13, 2008
1 parent f3df693 commit 8160e1e
Show file tree
Hide file tree
Showing 2 changed files with 11 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: c26c56c0f40e200e61d1390629c806f6adaffbcc
refs/heads/master: 5aaa70a80f5bbfcc4d6a1f844bdd1c5d6b445b5f
19 changes: 10 additions & 9 deletions trunk/drivers/char/pcmcia/ipwireless/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ static int ipw_write_room(struct tty_struct *linux_tty)
struct ipw_tty *tty = linux_tty->driver_data;
int room;

/* FIXME: Exactly how is the tty object locked here .. */
if (!tty)
return -ENODEV;

Expand Down Expand Up @@ -397,6 +398,7 @@ static int set_control_lines(struct ipw_tty *tty, unsigned int set,
static int ipw_tiocmget(struct tty_struct *linux_tty, struct file *file)
{
struct ipw_tty *tty = linux_tty->driver_data;
/* FIXME: Exactly how is the tty object locked here .. */

if (!tty)
return -ENODEV;
Expand All @@ -412,6 +414,7 @@ ipw_tiocmset(struct tty_struct *linux_tty, struct file *file,
unsigned int set, unsigned int clear)
{
struct ipw_tty *tty = linux_tty->driver_data;
/* FIXME: Exactly how is the tty object locked here .. */

if (!tty)
return -ENODEV;
Expand All @@ -433,6 +436,8 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
if (!tty->open_count)
return -EINVAL;

/* FIXME: Exactly how is the tty object locked here .. */

switch (cmd) {
case TIOCGSERIAL:
return ipwireless_get_serial_info(tty, (void __user *) arg);
Expand Down Expand Up @@ -467,13 +472,6 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
}
return 0;

case TCGETS:
case TCGETA:
return n_tty_ioctl(linux_tty, file, cmd, arg);

case TCFLSH:
return n_tty_ioctl(linux_tty, file, cmd, arg);

case FIONREAD:
{
int val = 0;
Expand All @@ -482,10 +480,11 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
return -EFAULT;
}
return 0;
case TCFLSH:
return tty_perform_flush(linux_tty, arg);
}
}

return -ENOIOCTLCMD;
return tty_mode_ioctl(linux_tty, file, cmd , arg);
}

static int add_tty(dev_node_t *nodesp, int j,
Expand Down Expand Up @@ -588,6 +587,8 @@ void ipwireless_tty_free(struct ipw_tty *tty)
tty_hangup(ttyj->linux_tty);
/* Wait till the tty_hangup has completed */
flush_scheduled_work();
/* FIXME: Exactly how is the tty object locked here
against a parallel ioctl etc */
mutex_lock(&ttyj->ipw_tty_mutex);
}
while (ttyj->open_count)
Expand Down

0 comments on commit 8160e1e

Please sign in to comment.