Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93299
b: refs/heads/master
c: 7b1fc8b
h: refs/heads/master
i:
  93297: 3387a12
  93295: baf607d
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent 362c5ef commit 5e4378c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: e298449401463dd18f24a87c48f9b0ec62bad936
refs/heads/master: 7b1fc8bc6d6881ff7f8876cbe665b3ad5271bc03
18 changes: 13 additions & 5 deletions trunk/drivers/usb/serial/iuu_phoenix.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,21 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
unsigned int set, unsigned int clear)
{
struct iuu_private *priv = usb_get_serial_port_data(port);
struct tty_struct *tty;
tty = port->tty;
unsigned long flags;

/* FIXME: locking on tiomstatus */
dbg("%s (%d) msg : SET = 0x%04x, CLEAR = 0x%04x ", __FUNCTION__,
port->number, set, clear);

spin_lock_irqsave(&priv->lock, flags);
if (set & TIOCM_RTS)
priv->tiostatus = TIOCM_RTS;

if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) {
dbg("%s TIOCMSET RESET called !!!", __FUNCTION__);
priv->reset = 1;
return 0;
}

spin_unlock_irqrestore(&priv->lock, flags);
return 0;
}

Expand All @@ -173,7 +174,14 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
static int iuu_tiocmget(struct usb_serial_port *port, struct file *file)
{
struct iuu_private *priv = usb_get_serial_port_data(port);
return priv->tiostatus;
unsigned long flags;
int rc;

spin_lock_irqsave(&priv->lock, flags);
rc = priv->tiostatus;
spin_unlock_irqrestore(&priv->lock, flags);

return rc;
}

static void iuu_rxcmd(struct urb *urb)
Expand Down

0 comments on commit 5e4378c

Please sign in to comment.