diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 22:59:04 -0400 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 22:59:04 -0400 | 
| commit | 73ecf3a6e3f0206bf56a0fefe3b3eda042fb7034 (patch) | |
| tree | 866f0ebb2b148479e93b5ac955097b1cc94ceb4e /drivers/net/usb/hso.c | |
| parent | b9da0571050c09863e59f94d0b8594a290d61b88 (diff) | |
| parent | cd3ecad19aea8debae9a48b53de2ec7a571f24e9 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (49 commits)
  serial8250: ratelimit "too much work" error
  serial: bfin_sport_uart: speed up sport RX sample rate to be 3% faster
  serial: abstraction for 8250 legacy ports
  serial/imx: check that the buffer is non-empty before sending it out
  serial: mfd: add more baud rates support
  jsm: Remove the uart port on errors
  Alchemy: Add UART PM methods.
  8250: allow platforms to override PM hook.
  altera_uart: Don't use plain integer as NULL pointer
  altera_uart: Fix missing prototype for registering an early console
  altera_uart: Fixup type usage of port flags
  altera_uart: Make it possible to use Altera UART and 8250 ports together
  altera_uart: Add support for different address strides
  altera_uart: Add support for getting mapbase and IRQ from resources
  altera_uart: Add support for polling mode (IRQ-less)
  serial: Factor out uart_poll_timeout() from 8250 driver
  serial: mark the 8250 driver as maintained
  serial: 8250: Don't delay after transmitter is ready.
  tty: MAINTAINERS: add drivers/serial/jsm/ as maintained driver
  vcs: invoke the vt update callback when /dev/vcs* is written to
  ...
Diffstat (limited to 'drivers/net/usb/hso.c')
| -rw-r--r-- | drivers/net/usb/hso.c | 35 | 
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 1cd752f9a6e1..b8e957249132 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c  | |||
| @@ -1645,11 +1645,11 @@ hso_wait_modem_status(struct hso_serial *serial, unsigned long arg) | |||
| 1645 | * NB: both 1->0 and 0->1 transitions are counted except for | 1645 | * NB: both 1->0 and 0->1 transitions are counted except for | 
| 1646 | * RI where only 0->1 is counted. | 1646 | * RI where only 0->1 is counted. | 
| 1647 | */ | 1647 | */ | 
| 1648 | static int hso_get_count(struct hso_serial *serial, | 1648 | static int hso_get_count(struct tty_struct *tty, | 
| 1649 | struct serial_icounter_struct __user *icnt) | 1649 | struct serial_icounter_struct *icount) | 
| 1650 | { | 1650 | { | 
| 1651 | struct serial_icounter_struct icount; | ||
| 1652 | struct uart_icount cnow; | 1651 | struct uart_icount cnow; | 
| 1652 | struct hso_serial *serial = get_serial_by_tty(tty); | ||
| 1653 | struct hso_tiocmget *tiocmget = serial->tiocmget; | 1653 | struct hso_tiocmget *tiocmget = serial->tiocmget; | 
| 1654 | 1654 | ||
| 1655 | memset(&icount, 0, sizeof(struct serial_icounter_struct)); | 1655 | memset(&icount, 0, sizeof(struct serial_icounter_struct)); | 
| @@ -1660,19 +1660,19 @@ static int hso_get_count(struct hso_serial *serial, | |||
| 1660 | memcpy(&cnow, &tiocmget->icount, sizeof(struct uart_icount)); | 1660 | memcpy(&cnow, &tiocmget->icount, sizeof(struct uart_icount)); | 
| 1661 | spin_unlock_irq(&serial->serial_lock); | 1661 | spin_unlock_irq(&serial->serial_lock); | 
| 1662 | 1662 | ||
| 1663 | icount.cts = cnow.cts; | 1663 | icount->cts = cnow.cts; | 
| 1664 | icount.dsr = cnow.dsr; | 1664 | icount->dsr = cnow.dsr; | 
| 1665 | icount.rng = cnow.rng; | 1665 | icount->rng = cnow.rng; | 
| 1666 | icount.dcd = cnow.dcd; | 1666 | icount->dcd = cnow.dcd; | 
| 1667 | icount.rx = cnow.rx; | 1667 | icount->rx = cnow.rx; | 
| 1668 | icount.tx = cnow.tx; | 1668 | icount->tx = cnow.tx; | 
| 1669 | icount.frame = cnow.frame; | 1669 | icount->frame = cnow.frame; | 
| 1670 | icount.overrun = cnow.overrun; | 1670 | icount->overrun = cnow.overrun; | 
| 1671 | icount.parity = cnow.parity; | 1671 | icount->parity = cnow.parity; | 
| 1672 | icount.brk = cnow.brk; | 1672 | icount->brk = cnow.brk; | 
| 1673 | icount.buf_overrun = cnow.buf_overrun; | 1673 | icount->buf_overrun = cnow.buf_overrun; | 
| 1674 | 1674 | ||
| 1675 | return copy_to_user(icnt, &icount, sizeof(icount)) ? -EFAULT : 0; | 1675 | return 0; | 
| 1676 | } | 1676 | } | 
| 1677 | 1677 | ||
| 1678 | 1678 | ||
| @@ -1764,10 +1764,6 @@ static int hso_serial_ioctl(struct tty_struct *tty, struct file *file, | |||
| 1764 | case TIOCMIWAIT: | 1764 | case TIOCMIWAIT: | 
| 1765 | ret = hso_wait_modem_status(serial, arg); | 1765 | ret = hso_wait_modem_status(serial, arg); | 
| 1766 | break; | 1766 | break; | 
| 1767 | |||
| 1768 | case TIOCGICOUNT: | ||
| 1769 | ret = hso_get_count(serial, uarg); | ||
| 1770 | break; | ||
| 1771 | default: | 1767 | default: | 
| 1772 | ret = -ENOIOCTLCMD; | 1768 | ret = -ENOIOCTLCMD; | 
| 1773 | break; | 1769 | break; | 
| @@ -3300,6 +3296,7 @@ static const struct tty_operations hso_serial_ops = { | |||
| 3300 | .chars_in_buffer = hso_serial_chars_in_buffer, | 3296 | .chars_in_buffer = hso_serial_chars_in_buffer, | 
| 3301 | .tiocmget = hso_serial_tiocmget, | 3297 | .tiocmget = hso_serial_tiocmget, | 
| 3302 | .tiocmset = hso_serial_tiocmset, | 3298 | .tiocmset = hso_serial_tiocmset, | 
| 3299 | .get_icount = hso_get_count, | ||
| 3303 | .unthrottle = hso_unthrottle | 3300 | .unthrottle = hso_unthrottle | 
| 3304 | }; | 3301 | }; | 
| 3305 | 3302 | ||
